I've struggled with this issue a lot since around 6.1. Not sure if that has any significance but it's when it really became apparent to me.
I like to use a DualShock 4 controller connected directly by wire to the PC when I play. Typical symptoms are that the lightbar will briefly cut off, all inputs from the controller will be dropped during this time (for example coming to a complete stop in the middle of a fight), as well as a brief hiccup in audio. Sometimes it might take a couple hours to occur, other times it's just a gap of 10 seconds. In its worst instances the game is unplayable with a controller.
If Votraftur's advice doesn't help, here's what I've tried:
- Entering Device Manager and disabling Microsoft Device Association Root Enumerator
- Entering Device Manager again and disabling Xvdd SCSI Miniport (Listed under Storage Controllers, you might need to check View > Show Hidden Devices to find this one).
If you have ever used a Windows Store or Game Pass game on the PC before, you'll want to try the second as it seems like they create virtual drives that mount and unmount in the background. Like Malevalent has said: the issue seems to be with how the game handles any kind of change within the device manager. The controller may work perfectly in other games, but not in this one.
Unfortunately, I don't have a concrete solution as the last fix only lasted a few days for myself. I've read others claiming this might be because Windows will want to keep calling the function or it just turns itself on again by magic. Either way, some have gone ahead and tried also uninstalling the Windows Xbox application or Gaming services though I've yet to try that personally.
I'd rather not have to cannibalise a bunch of functionalities to just get my controller to work, so it would be really appreciated if the developers could address how the game handles device changes in a smoother manner.