Animation skipping

Hey guys I’ve got a relatively simple problem that I don’t know how to conquer.

In my project I have a simple cube with a movement script attatched to it. When i press an arrow key I move 1 unity in that direction. So if i press ‘right’ my position changes from 0, 0, 0 to 1, 0, 0. I have the transition lerped so it looks like the cube just slides from one position to the other.
I added an animation to my cube using the animation component(not animator) which made the cube appear to roll in the direction it travels in.

Tapping in a direction and waiting for the movement to finish will result in no animation skipping
However my problem is that if I hold a direction down, the roll animation does not play consistently, sometimes the animation will roll 5/5 movements sometimes 3/5 sometimes 0/5. I have no idea how to fix this, any help would be greatly appreciated. (The movement duration is 0.5 seconds and the animation duration is 0.47 seconds)

using UnityEngine;
using System.Collections;

public class Movement : MonoBehaviour {
	public const float stepDuration = 0.5f;
	private Coroutine playerMovement;
	private Animation MovementAnimation;

	private void Start()
	{
		MovementAnimation = GetComponentInChildren<Animation> ();
	}

	private void Update()
	{
		if (playerMovement == null)
		{
			if (Input.GetKey(KeyCode.W))        //In general not a good idea to use Input.GetKey; use Input.GetButton instead
			{playerMovement = StartCoroutine(Move(Vector3.forward));}
			else if (Input.GetKey(KeyCode.S))
			{playerMovement = StartCoroutine(Move(Vector3.back));}
			else if (Input.GetKey(KeyCode.D))
			{playerMovement = StartCoroutine(Move(Vector3.right));}
			else if (Input.GetKey(KeyCode.A))
			{playerMovement = StartCoroutine(Move(Vector3.left));}
		}
	}
	
	private IEnumerator Move(Vector3 direction)
	{
		print (direction); 
		if (direction == Vector3.left)
		{MovementAnimation.Play("MovementLeft");}
		if (direction == Vector3.right)
		{MovementAnimation.Play("MovementRight");}
		if (direction == Vector3.forward)
		{MovementAnimation.Play("MovementForward");}
		if (direction == Vector3.back)
		{MovementAnimation.Play("MovementBackward");}

		Vector3 startPosition = transform.position;
		Vector3 destinationPosition = transform.position + direction;
		float t = 0.0f;
		
		while (t < 1.0f)
		{
			transform.position = Vector3.Lerp(startPosition, destinationPosition, t);
			t += Time.deltaTime / stepDuration;
			yield return new WaitForEndOfFrame();
		}
		
		transform.position = destinationPosition;
		
		playerMovement = null;
	}
}

I hope this is written with enough clarity. Thank you for your time everyone.

Replace every “Input.GetKey” with “Input.GetKeyDown”.