The reason why the attack animation is glitchy is because a premature Cancel command queues up the stop attack trigger in the animator. So when next time the attack animation is triggered, the animator transitions back to locomotion state instanly.
That is correct. You can prevent this by resetting the stop attack trigger immediately before calling Attack (actually, I reset both Attack and StopAttack triggers before setting either trigger).