Changing only one axis(Transform.Position) in Animation Event

I’m first to unity engine and want to make a simple platformer game.
Player’s original X position is -6, and automatically moves forward changing position.x.
I’d like to fix player’s y position for between two keyframe when I play an animation, slowly increasing y position before first keyframe and decreasing to original y position after second keyframe.
I tried this by adding four keyframes, setting first and last keyframes’ position.y to original y value and second and third keyframes’ position.y to increased y value.
But when I only edit poision.y value, position.x value is automatically fixed to -6(original x value) and player does not move at all. Deleting all position.x keyframe value also yields same result, fixing player’s x position.
This problem occurs even when I don’t play the animation, meaning player’s position is fixed from the very beginning of the game.
So here is the question : How can I edit only player’s y value, not interfering x value?

You can’t the localPosition is one property of type Vector3. Animation happens generally in local space. You generally want to avoid animating objects without a root object. You usually animate the child objects which allows you to place and rotate the parent as you like