Someone knows why this is happening with my spline?

No worries I am not sure this tangent will work in long term, think it can fail.

If you are trying to put player on dedicated rails movement on a spline.

Maybe getting something like below can be more efficient in that terms. Always get a point infornt of player at a distance and request a direction to that.

good luck!