An initial solution looked to have been found from an old Fallout 4 VR thread on Steam, where the same problem could be fixed by using a console command to change the player's sex.
In Starfield, the same command works, but all you need to do to fix the bug is enter the character customisation screen. Using console commands, this can be done by entering 'showlooksmenu player 2'. If you're playing Starfield on console, you can visit an Enhance Clinic for 500 credits to get into the character customisation. You don't actually have to change your appearance, as players have reported that simply entering and exiting customer customisation makes weapons work as intended once again.
This was already true, but is even more so now - Bethesda should make console commands available on Xbox immediately. Besides the fact that there was no reason to restrict them to PC players in the first place, they're almost certain to be necessary for all sorts of weird troubleshooting that's likely to come up in any game this big.