I read the linked thread. WHile the first and last keyframes of the cycle need to be the same, I’m going to suggest something about the travel. Rather than eyeball it, take the stride pose and line up any object with the contact point of the back foot and note the Z value. Then move the object forward to match the contact point of the front foot, and get the Z value.
Subtract and the difference is the amount of travel per step. If you set up some expression, remember that is one half the cycle, so you’ll need to double it. If you are setting the distance “manually”, then multiply the number of steps by the travel per step distance to get the full amount of travel.
Best,
Rick