To fix your Z-axis slipping down, you should try tightening your eccentric nuts that hold the X-gantry to the Z-axis. You should also look towards fixing binding issues on your 3D printer by loosening and tightening the right screws. Read more about Ender 3 z axis limit switch adjustment.