That's odd for crafting gumps
I know bags do that, and nextcontpos x y only seems to work with the backpack, so my remedy has been to force the gump in question to where I want it for the clicks:
positioncraft1:
contpos %craftgumpposx %craftgumpposy
if #contposx <> %craftgumpposx && #contposy <> %craftgumpposy
goto positioncraft1
I really only did this so I could pull the set click values out of the loop so people could readily change the clicks as needed.
Not really an answer to your question, but I would bet only cheffe/ the maker's of the UO UI could answer that.
-edit-
On reread, it sounds like you dragged the gump with your mouse at some point... Gumps can only PERMANENTLY be moved with the mouse, or using click x y D click MC r, or probably event drag/drop... (not exevent drag/drop)