Occasionally, the bug continues to happen when I close the inventory too. Opening the inventory seems to trigger the bug. I’m not sure how to replicate it happening with the inventory closed, but it can happen... putting your gun away, and returning it to your hands seems to make it stop.
Also, it seemed to affect my characters movement after a while. Like I was running 2 steps forward, and 1 step back.