I think, in simple terms, the GFCI detects differences in current between conductors ... if there's more current flowing out than coming back, there's a potential "ground fault"... meaning current has found a return path to "earth" that bypasses the correct return path (the neutral and ground conductors).
In terms of human safety, this is because someone has contacted an energized appliance and a water source (IE hair drier in the bathtub)
You could have a failed appliance somewhere on the circuit, that is leaking current into the RV frame or your inverter could be miswired (neutral bonding for example). It could be as simple as a loose connection inside an outlet, an open neutral for example.