I've found out how to recreate this animation bug.
First attack a unit, then move away and keep clicking to move to a different place before you get to the targetted move location. He will continue to do the attack animation until he gets to his destination, and will only stop if you let him stop moving.