Some of these MKS boards have an external pullup on the endstops, ie not disable in software. This may cause you issues
Easy way to test is just move the endstop pin to spare exp port
Easy way to test is just move the endstop pin to spare exp port