I don’t think there’s anything basically wrong with how you did it. But from looking at the blue dotted line motion path in your screen shot, I think the change in horizontal position is expected because of the type of keyframe spatial interpolation that’s currently applied, and all you probably need to do is change that. If you look at the motion path shown in your screen shot, it curves outward, clearly indicating that the path is not straight but goes around the keyframe in a curve. I think that is the curve that’s described by the horizontal Position value seeming to drift out and back. For me, that’s a clue that a Bézier spatial interpolation is applied. I highlighted the current curve of the motion path in red, on the right side of the picture below.
I made a sequence to approximate your curved motion path. If I right-click the keyframe where it’s supposed to move vertically and I choose Spatial Interpolation, I find that yes, Auto Bezier is applied, as shown on the left in the picture below. To make the segment straight between those two keyframes so that it goes straight down, change the Spatial Interpolation to Linear.

After the Spatial Interpolation is changed to Linear for both of the keyframes that define that segment, the motion path should become straight, as shown in the animation below.
You can see that by changing the Spatial Interpolation to Linear for a keyframe, the two Bézier curve handles go away. They defined the curve, so when they go away that segment becomes a straight line. In fact, when I drew the red line to match the motion path curve in the first picture, in Photoshop I simply drew a Bezier path with the Pen tool that matches up with the Bézier curve handles on the Premiere Pro motion path in the screen shot!
