I could not stop thinking about using the 4 PCB mounting screws for the PCB/sensor alignment. I may have come with a solution.
Here is back-of-envelope drawing
of the possible solution.
We would need to:
1. Drill a hole all the way through the box and make it large enough to remove the existing thread in the mounting holes
2. Bore a hole from outside with diameter larger than the existing hole and deep enough to fit a rubber o-ring in it
3. Put a screw into the new hole so it sits on the o-ring
4. PCB sits on a spring
5. The screw goes through the spring, through the PCB and is screwed into a nut that is fixed so it cannot rotate. For example, it could be glued to the PCB.
The screw will compress the o-ring when tightened and create a seal. Tightening/loosening the screw (from outside) will change the spacing of that corner of the PCB. We have 4 corners instead of 3 which makes it a bit trickier to do the alignment but it should work.
Longer screws will even allow adjustment of the sensor distance from the glass.
Sounds too simple...