Seen this exact headache on a few narrowboat setups. Nine times out of ten when shore power isn't properly pushing charge into the batteries, the culprit is either the shore power inlet rating being mismatched to the charger demand, or the inverter/charger not actually switching into charge-only mode correctly.
What inverter/charger are you running? If it's a Victron Multiplus, check your input current limit in VictronConnect — boats at marina pedestals are often limited to 6A or 10A, and if the Multiplus tries to pull more it'll either trip the pedestal breaker or throttle back weirdly.
Also worth checking:
- Battery type profile — if you've got lithium (Fogstar Drift cells are popular on narrowboats right now) but the charger is set to AGM, absorption voltage will be wrong
- Shore power cable and connections — voltage drop on a long pontoon run can fool the charger into thinking input is unstable
- Earth/neutral integrity — canal environments are brutal for corrosion on terminals
From my own setup (cabin-based rather than marine, but same Victron kit), I found the assistant settings in Multiplus were the silent villain once. Shore power was present but the unit kept defaulting to inverter mode rather than charger mode because the AC input quality was being flagged internally.
Have you got a Cerbo GX or any monitoring on the system? That'll give you proper visibility of what the inverter is actually seeing on the AC input side versus what it's doing on the DC side.
What's your battery bank size and chemistry? That'll help narrow it down further.