Repeatable Bug: Basing with the chat window open
So I'm putting this incase it's a common issue people want to upvote:
When you B and with an open chat window, and you're typing (may or may not be a factor) the game can freeze for a second and then continue. But it puts attack-move-click on left click. I assume the game is registering the 'A' button as being held down.
With no 'movement only' command, you'll end up autoing the nearest enemy unit, even if you're trying to move away.
Exit and reopen the game to fix.