Just a SWAG but that is an analog sensor where power supplies need to be clean and stable. You might post a schematic showing how it is connected to your arduino. Also what is powering it. Try a small cap at the +5 and Gnd terminal of the sensor and see if that helps. I try to get my sensor outputs stable first, that keeps the code much simpler.
What are the minimum and maximum depths you want to measure? What liquid is in the pool? Why not use an ultrasonic distance measuring device located at the top of the pool? I am doing that for a swimming pool. The sensor is 7 cm above the top of the filled pool pointing down. It gives me the distance to the current water level. It works fine. I'm using A02YYUW Waterproof Ultrasonic Sensor SKU: SEN0311-DFRobot