This has never happened to me. NPC's always stay put when I'm interacting with them. If you go afk while the menu is open, then after a minute they resume their walking route. Something that has happened to me before is I would be interacting with an NPC, then another NPC would walk by and push me away, making me exit the menu. It would be really boring if everyone just stood in the same spot, so this movement is good, it's just I wish NPC's wouldn't be so rude, and walk around you when you are in your bank/selling items/doing emotes instead of walking into you.