density of water does not change
True.. within the context of the discussion...
But I bet water on the other side of the tank wall changes the capacitative environment at that point on the sensor... perhaps because(?) of the density of the substance there, water, rather than air. Or some other property of the two, but, bottom line, idea for sensing level MIGHT work...
===
The OP may have heard of level sensor which work based on the OPTICAL density of fluids, and their effect on beams of light bouncing... or not bouncing... around inside prisms. This is used in ink jet cartridges, Canon for one. But the prism has to be in direct contact with the contents of the tank.