In the first screenshot, you go to the different layout and do a Find[restore], but you assume that it goes well and then immediately do a Set Field.
If the find goes wrong, or produces slightly different results then the Set Field updates the ID in the wrong record (or the find finds nothing and nothing gets set).
Do error trapping and handling after the find.
As an aside: for code readability you may want to avoid using the "restore" option of a find request and do it explicitly. Much easier to troubleshoot.
the user gets the error 301: Record is in use by another user. In the script since it is popping up in a new window, could it be that since the user is in the tool record originally, be the cause for the field to not be editted?
Sure, that could be the problem. A simple commit before the new window would clear that up.
The cause could simply be behavioral. One user may tab through the fields leaving the record uncommitted while others click and don't before running the script. Or maybe that user initiates the "new" phase far more often than the others.
What does your "Popup Window Setup" script look like? Do you have any script triggers running on any of the layouts in this script?
The Popup Window Script just pops open the window needed, then the original script sets the layout it goes to. I ended up just setting up a button for them to click when they finished entering in the fields in the popup. Which sets the id to a variable then closes the window. I just set the field once the windows closes instead of before you are entering in data in the popup. It works this way now.