It's really hard to say, not knowing which email client is being used.
However, if you mean Outlook - yes that is very annoying.
As long as the folder pane is configured large enough to display all the folders and their names (i.e. no scroll bars) then it will stay put. If not, then whenever the cursor nears an edge outlook tries to helpfully scroll for you, which often as not results in dumping the mail into the wrong folder.
Reducing the mouse sensitivity to movement may help some.
The best way is to mark the message(s), right click and choose "move to folder" and then select the destination from the dropdown list. At least for us folks who find dropping a drag.
Jock