I searched the Internet for sealed limit switches and found some at https://www.amazon.com/Uxcell-Seale...45339611&sr=8-10&keywords=sealed+limit+switch because a limit switch failed on my CNC router. Are there sealed limit switches with levers with or without rollers that are the same size as unsealed limit switches?
Look into inductive or capacitive proximity switches/sensors. All of them should be IP65 or IP67 by default.
https://www.digikey.com/product-detail/en/omron-electronics-inc-emc-div/D2QW-C003H/SW1221-ND/2698560 These have no lever. They come on the Shapeoko. Sealed and no play like you get from the lever type. You can look through the OMRON catalogue and find one that matches better to what you have. These are all high quality switches which can be found at Digikey or Mouser. https://omronfs.omron.com/en_US/ecb/products/pdf/en-d2sw.pdf
I found the switches that I need at: https://www.digikey.com/product-detail/en/D2VW-5L2-1HS/SW437-ND/277828/?itemSeq=280403967