Height adjustment of PCBs in increments of 0.05 mm
Years ago I visited a local PCB fabricator to see how they actually make boards. Process starts with the two innermost copper foil layers, then additional layers are glued on (with epoxy). The whole sandwich is finally run through a roller press machine that sets the final thickness. For controlled-impedance boards, the PCB vendor does a test run, measures the impedance, and then adjusts the width of the traces to compensate for the actual FR4 batch electrical permeability and the actual layer thickness.

So no, I don't think the PCB vendor can control the PCB thickness with that fine a resolution. If you do find a PCB vendor that claims they have that much control of the initial dimensions at room temperature, it's probably going to cost a steep premium.

But even if the initial dimensions were exactly what you require, the material's thermal coefficient of expansion causes mechanical strain in the material itself (expand/contract, warp/fill, bow/twist, etc.) Usually these effects are considered negligible, but if you're concerned about a mere 0.05mm dimensional error, then you will have serious problems as the temperature changes. In civil engineering, every bridge must have a roller or other expansion joint, or else the bridge will fail. Same principle here. If there's no place for thermal expansion strain to go, then the design will fail at its weakest point -- apparently that's what's causing the issue with your sensor. (You don't say what kind of sensor it is, but most sensors have some amount of unwanted sensitivity to temperature and mechanical stress.)

I would recommmend spliting the PCB design into two smaller PCB assemblies. Use a very small PCB for the sensor and any support components that needs to be within 10mm of the sensor, and use a ribbon cable or a Flat Flex Cable (FFC) to connect the sensor PCB to the main PCB. The main PCB mounts to the box with screws, and the sensor PCB mounts with only the sensor itself -- the sensor PCB is supported by the sensor. This way, the sensor-only board ends up being small enough that dimensional stability effects are negligible, and any mechanical stresses from the box + main PCB will be absorbed by the cable.

If that's not a workable idea due to space constraints, maybe borrow a page from the LCD playbook and use Zebra strip instead of cable. See Can zebra strips (elastomeric connectors) be cut to size? -- note that this works by using compression force to hold the two boards together (sensor PCB is playing the role of the LCD glass in this scenario), and the Zebra strip elastomer is where all the mechanical strain goes.