There are only 2 ways for city water to find it's way into the fresh water tank:
1. The built-in check valve inside the water pump could be leaking; sometimes simply running the pump a bit will clear what ever tiny bit of debris was causing the issue. If it continues, they can usually be rebuilt.
2. The City Water Tank Fill Valve is leaking. Sometimes opening & closing the valve several times, solves the problem, sometimes the valve handle has slipped and is no longer turning the inside valve all the way. Of course, this can only occur if you actually HAVE a valve that allows freshwater tank filling from the city water hookup. If not, then ONLY #1 applies.
A leaking check valve at the city water hookup will NOT leak into the freshwater tank; it will leak water outside of the RV when you are running the pump and there is no hose hooked up.