Stock micro switches on Creality machines are cr*p they are too small, to flimsy and tend to catch oxides on contacts.
Good for some time, then they start giving false positive, on Z axis its noticable.
If your printer homes Z axis but you do not hear a click like when you press the endstop with your finger, then your switches are dodo.
Solve it with high quality Omron switches and this bracket.
Designed and fit for Ender 3 pro.
Soldering or crimping tool is needed.
Wires position marked on second image.
Horizontal expansion applyed in designe.
The author marked this model as their own original creation.