A force balance, nothing more
The whole device reduces to one equation: the magnetic pull on the plunger must exceed the spring load plus line pressure acting over the orifice area. The coil surrounds a thin-walled non-magnetic core tube, sealed at the top by a fixed ferromagnetic stop. The plunger, a ferromagnetic slug with an elastomer or PTFE insert in its nose, slides inside the tube with the medium around it. Energise the coil and flux crosses the air gap between plunger and stop, pulling the plunger up and the seal off the orifice. De-energise, and the spring, helped by any pressure above the seat, drives it shut in milliseconds. There are no external moving seals; the core tube is the pressure boundary, which is why leakage to atmosphere is essentially zero.