@NED @Henki Ok, I was able to reproduce the bug and fixed it.
In short, I developed the "bind weapon" script expecting that the engine would clear the held weapon in the exact frame defined through the "throwframe" command.
However, I discovered that the held weapon will only be cleared by the engine when the entire animation that has the "throwframe" ends. Like I suspected, this small interval was enough to keep the previous weapon variable but using a new weapon model.
Just for context, it may be useful.
The held weapon used by my script is the one that is "hidden" when picked up on the ground. Then I get the weapon name by using getentityproperty(self, "weapent"), refering exactly to this hidden weapon item, not the player weapon model.
So, I thought that this hidden weapon item is eliminated in the "throwframe", but now I confirmed that this is eliminated when the player weapon model is changed.
View attachment 10267
Thank you both for reporting it, the fix will be launched in the next beta
EDIT: Sorry, I forgot to post the solution. Once the engine is acting correctly, I just adapted the bind weapon script to clear all variables related to previous weapons in the proper moments.