Assuming the displacement happens along the X axis, check the pulley attached to the motor shaft.
Almost certainly, the setscrew holding the pulley to the shaft is loose, allowing the pulley to rotate on the motor shaft. The setscrew should be tight against a flat on the shaft, but when it’s loose the shaft can turn a little bit one way or the other: it jams in one position until the motion works it loose, then it rotates and jams in the other position.
Tighten the setscrew in the middle of the flat and things should start working again.
A length discussion of a similar situation:
The pulley on that machine had a clamp, rather than a simple setscrew, but the solution is the same.