Do you have an inverter? Is the neutral on the output side separate from the neutral for the rest of the boat.
When inverters are uncovered, they bond earth and neutral. Once they detect power, they break that bond. The delay is usually enough to pop shore RCDs.
Other than that, shut off all AC breakers, including main, plug up and turn on shore pedestal. Then turn on AC main. Then turn on the other breakers one at a time until something trips it. Then debug that circuit, then keep going.
If main trips it with all breakers off, make sure there are no fused loads without breakers, removing fuses as needed. If it still pops, really make sure there are no off breaker loads, and then start debugging neutral and ground.
To do that, disconnect from shore power, turn off other power SourceSafe, and check from neutral bus to ground bus with an ohm meter. If it isn't infinite, look for the offending connection. If you don't see it, start plucking off neutrals or grounds until you find a connection or the circuitbthqt is making the connection, then debug from there.