ESD problem on water tank?
Sounds like a bad design of the sensor.  Static is always a potential problem so the sensor should be protected.  If it’s a capacitive type for example (very common) it would include a proper series resistor(s) and a spark gap.
If the tank is floating, grounding it would be the first thing to try.  Static should not cause corrosion.