It's according to how your RV is plumbed. Some RVs have a separate connection for 'city water' and a gravity port to fill the water tank. In that case, the only way water would get from the city water line to the water tank would be through a leaking check valve at the water pump. Another symptom of a leaking check valve is you'll notice that when using the pump, it has to cycle on even when no one is using water due to the leak down of the water pressure back into the water tank.
If instead, your RV has a single connection for water, then you have a selection valve that either pressurizes the plumbing system (city water) or fills the water tank. If that valve leaks back into the water tank that can cause over-filling over time.
One caution, if you have the selection valve type system, even if the valve doesn't leak it might overfill the water tank by a leaking check valve at the pump as mentioned above.
Often the check valve is built into the water pump, you'll have to see if the check valve is available as a separate part or rebuild kit. If not replaceable, you could install a separate check valve in the supply line from the water tank to the pump.