Hall effect sensor, water flow indicator alarm

But then the problem comes?

If the magnet stops at the location that the hall sensor is? Then it will trigger and be a constant a high/low signal?

High which the sensor puts out

You are concerned with something which is not a problem.

Your sketch will be counting pulses, looking for a pin changing from low to high. You can do this with an interrupt or digitalRead(). If the sensor gives a constant high output is the same effect as a constant low output. There are no changes taking place, and the flow will be determined to be zero.