I’ve seen Google references to this bug going back at least six years.
I have a weapon, and a weapon on swap. I never use the weapon that’s on swap. I’d just been in combat, I died a couple of times, but finally I won, and stuff dropped. The fight was the final boss in ultimate in the vanilla game, but I do have all expansion and DLC installed. I wanted to see if a weapon that dropped was better than the one I had on swap.
I pressed the weapon swap button on the “I” page. The button changes appearance when it’s clicked but nothing happens, the weapons don’t swap. I remove the weapon I had equipped and tried again. I put the weapon back and tried again. I changed the hot key for weapon swap (I had removed this hot key option) and pressed that key.
None of this worked. I restarted the game and it worked perfectly.
This is a generic Windows PC and there are no mods.