Something about walking over an object / doing the falling animation whilst doing a different animation, such as swapping weapon or melee attacking, seems to cause the hand slot and in some cases also the entire inventory to become unresponsive.
I have been unable to replicate this when doing so intentionally but it has happened many many times during normal gameplay and it always occurs this way, so I believe it must be the correct cause.
There appears to be 2 different bugs -
Bug #1 - Item gets stuck in hand slot
Bug #2 - Item gets stuck in hand slot + the inventory cannot be opened
Clip #1 - Knife is stuck in the hand slot + inventory is bugged and refuses to open
1.18 Experimental
Glock is out of ammo and the slide is pulled back
I swap from the glock to the knife, putting the glock back into my plate carrier chest holster - as this is happening I walk over and back down a bench
I then get ontop of the benches and start swinging at the zombie, my 3rd swing pulls me forwards off of the bench, and I am mid-air / falling right at the end of the swing
It was after this that I noticed my knife was stuck in my hands and I couldn't open my inventory
I believe the bug either happened right as I walked over the bench during my weapon swap, or when I was doing the falling animation during/after my 3rd swing.
Clip #2 - Sledgehammer is stuck in the hand slot, but my inventory still opens
1.18 Experimental
As I try to put my sledge away, I walk over the zombies dead body, cancelling the animation and glitching my hand slot
Sledge is stuck in my hands but I can still open my inventory
Important detail to note - Zombies don't always have collision as they are dying (at least not in my experience) but occasionally they will - causing the player to get bumped upwards briefly as they hit and walk over the body, if this happens as you are swapping weapon for example, there seems to be a very high chance that it will break the hand slot, (and potentially the inventory, not 100% sure) as you can see in this video.
Clip #3 - Summit1G gets deagle stuck in his hand slot, but his inventory still opens
1.18 Stable
Obviously I am not playing in this clip so I cannot say for certain exactly what happened but I will provide my best explanation based on my personal experience with the bug and what I can see happening.
I believe what happens to Summit here is that he tries to put his deagle away, then he steps to the left, putting his character on top of the railing, and thus beginning the falling animation, this cancels his weapon swap animation and puts the deagle back into his hands, becoming stuck.
Notice how his hotbar shows the deagle turn red right before he starts falling (it briefly turns red when you swap weapons, I believe that's what he is doing here)
Then he steps to the left and starts the falling animation, this cancels the swap animation and puts it back into his hands.
After landing the deagle shows a green background on the hotbar again suggesting he can put it away, but after he tries to do so it turns red permanently and he sees it's stuck in his hands.
There's also a brief period where it looks like he tries to do the 2 handed wave emote to fix the bug, and the hotbar turns green for a split second when doing so, but it looks like the animation get cancelled (or he cancelled it) and the hotbar immediately turns red again.
It's worth noting that Summit is playing on a modded server here (tactical leg holster) however I don't believe this to be an issue, as I have experienced the same problem playing on official servers (also want to note both of my personal 2 clips above were on official exp servers, not community)