Keyframe editing having unexpected effects

I was trying to add a simple lift in the middle of this short dash animation through keyframe stuff (shown), but doing so seems to lock my character’s position regardless of which state the animation is actually in. I don’t understand how changes that are applied through an animation playing are having effect before it is even played in the first place, let alone this behaviour.

At first thought you might imagine that deleting the keyframes for X and Z might be enough, so you are only animating Y but it doesn’t work like that, unfortunately. You cannot use animation in this way to move on the Y axis alone.

One solution is to consider how you define your player. It’s quite common to make the visible part of your player a child of an Empty Game Object. The parent has the script for movement but the child (the appearance of the player) has the animation. That way, you can use standard WASD or gamepad movement independent of the lift.

Another solution (if the first doesn’t work for some reason) is to use a coroutine which does the lift. Bit more coding to do there but come back if you need help doing it…

I already have an alternative option for this, I’m just confused by the behaviour and was looking for an explanation in case this has consequences outside of editing the transform through keyframes.