Old allegro, this happens fairly frequently. The usual cause is that the neutral and ground conductors are momentarily or permanently tied together at the time that the shore cord is plugged into a power source.
An ohmmeter connected across the pins of those conductors may show some low resistance value instead of near infinity. If it does, anything in the coach that is drawing power when you plug in the shore cord will send current over both conductors.
If the hot wire current and the neutral current are different at the GFCI, the GFCI will trip. If any current flows into the ground wire from the neutral, the hot and neutral will be different.
The cure is to put an end to any ground conductor current when pugging into shore power. The GFCI is looking for less than 5 ma of current difference when you plug in.
The inverter is capable of switching the neutral to prevent problems, but it depends on correct coach wiring to work.
Good luck.
Tom Caffrey