There are two water level sensor versions, namely, the float level sensor and the pressure sensor.
The float sensor is more vulnerable to mechanical damage by debris and animals, but it is cheaper to manufacture and simple to verify and maintain.
Obviously, it would be better to mount the sensor outside of the flow path where smaller debris and larger things, like treetrunks, floating down the stream could damage the
As can be seen on the photo on the left that positioning the float in the fast flowing stream is not ideal. The flow pattern causes bobbing which affects the stability of the measurement.