Additional info on this.
Windows 10+ will turn of power to USB devices to "save power". This can cause Win10 to lose the joystick and reassign it, causing COD to lose it. This is the default setting By MS. Since laptops are now more prevalent than desktops, most of the Win10/11 default settings are geared towards laptops.
So besides the info NavyAce provided, here's what else you need to do.
Right click on the Windows icon on your task bar and choose Device Manager.
Expand the Human interface Device section.
Right click on each USB input device listing and select Properties
In the Properties Window, select the Power Management tab
Uncheck the Allow computer to turn off this device to save power option
Click OK
Since the devices are not labeled, but given a generic name, do this for each of the listings labeled USB input device
Now you are halfway there.
(Note: possibility this may only apply to boards with USB3, but don't have an older one to check this on)
Scroll to the Universal Serial Bus Controllers listing and expand it.
Now you will modify the USB eXtensible host controllers (will say Intel or AMD depending on your chipset)
Right click on each USB eXtensible host controller listing and select Properties
In the Properties Window, select the Power Management tab
Uncheck the Allow computer to turn off this device to save power option
Click OK
Repeat for each eXtensible controller
Close the Device Manager
Now go do what NavyAce said. You will not only need to do what he said with the axes, but with any buttons / switches you want to assign to your joystick.
After hitting Apply, CoD throws you back out to the Menu. Click on controls again and then click on Save As and save the configuration under a name you'll remember. Since my joystick is a Logitech, that's what I called my file.
Haven't had to see if this will survive a Windows update, but here you go for now. Will come back and add to this if I learn additional necessary info.