Animation state constantly being run, how to work around this?

I’m having an issue with my player controller where I’m constantly triggering an animation state. For example, if I’m holding down W, the up animation state will be triggered but since I’m holding down the button, the state is constantly being run without completing the animation so all I’m seeing is the first frame. I tried to use Has Exit Time which partially fixed it but there is lag between switching animations since the previous animation has to complete before moving to the next state.

In function Update() :

if (Input.GetKey('w'))
		{
			playerRigidBody.velocity.y = speed;
			animator.SetBool("isUp", true);
		
		}
		else if (Input.GetKey('s'))
		{
			playerRigidBody.velocity.y = speed * -1;
			animator.SetBool("isDown", true);
		}
		else{
			playerRigidBody.velocity.y = 0;
			animator.SetBool("isUp", false);
			animator.SetBool("isDown", false);
		}

I just realized there is an option called “Can transition to self” ._.