Yes, they work just as well detecting side-on as face-on. Mounting them side-on allows the moving metal part to slide past the face of the sensor and if it overshoots it will go past and hit the physical end stop, and the sensor is saved. You still have to work out what went wrong, but the sensor is saved.