That sounds like you're only getting one leg of two when running the gen. I would guess that the leg that serves the inverter/charger is not getting 120v when on gen. If I am correct there will be other 120v appliances or receptacles that don't work that receive their power from the same leg. The issue could be a dirty contact or a loose connection inside the transfer switch.
The reason it's switching to invert is that it's not getting 120v power
'02 Ultimate Advantage 40J Spartan MM - Cummins ISC
2013 Jeep Rubicon JK Unlimited