Open up the drive and check switch continuity or bad solder joint.
Swap drives and see if the problem follows the drive.
Exact same stepper motor? If it isn’t, make sure both are same steps/degree. Most common are 1.8degree but there are .9degree also available.
Is the acceleration set the same on both axis? Looks like the gantry is set higher.