I am not being critical - but - since you have wired the switches "active high" they will trigger if anything is loose, poorly connected etc.etc.
Are you sure that your installation is well soldered and robust before we start trying to find the problem
The motor moving the carriage can loosen something, or disturb it enough to give a signal. With modern electronics the signal need be only micro seconds long to activate.
Yes - it may be some cross signalling, the way you have run your wires, but before we get into that, test the obvious.
I have just spent all afternoon improving my installation - the system works fine, but funnily enough it is the limit switches and bits that cause the bother. There is a temptation to do without them, because my system runs well enough, but there is something in me that says - no, get it going properly, and life will be simpler.
I don't know !!!