We used a PCB in an explosion proof enclosure. The side you connect to power and signal has to be physically isolated from the electronics and sensor. An FR4 board with solder mask is very waterproof. We put in a rubber gasket, made the board double thickness, and screwed it into the enclosure. It was a connector on each side, and ground plain to the screws.
Usually this was done by tapping holes in the aluminum enclosure, then screwing in sealed ferite beads and soldering them to a connector or a wire. Cost was huge, plus over tightening the bead would strip the threads out of the hole way to often.
One round board, and a soldered on connector had no leaks. I left the enclosure full of water for weeks, til it got stinky and I had to throw it out. Saved about $60+ per unit.