So, it sounds like what might help here is an option (and I stress option, since not everyone will want it) to be prompted with a confirmation box before the game executes your order. Because it's not just movement, in the example you gave above your intention may have been to move near the mob when a swaying animation suddenly resulted in clicking on the mob to attack.
Although, maybe the confirmation could just be limited to "execute movement?" prompts, since those tend to happen more often. And it would be listed in the options menu as "Confirm movement orders in combat?", or something.
The mode toggle (attack/move) discussed above is an alternative, but it's still vulnerable to user-end mistakes.