Solution 1: Set first keyframe to a Hold keyframe.
Solution 2: Select both keyframes, then in Animation/Keyframe Interpolation, make sure all are set to Linear.
To avoid in the future, set “default spatial intertpretation to linear” on in preferences.