If I had to guess, you have a standing leakage that is close to the point where the RCD starts tripping, and when the grid fails the disturbance caused by the Multi disconnecting the grid and then closing the ground bonding relay creates a transient that is just enough to push it over the limit.
Standing leakage: In every house there is a small amount of current that leaks to ground. This is due to actual leakage in conductors (usually very low), but also due to EMC and surge protection devices that is now fitted to many appliances. It is not uncommon to have a few milliamps of “normal” leakage, and this is known as the “standing leakage”.
In my house the standing leakage is 13mA. RCDs starts to trip around the 15mA mark. I actually measured mine and during switchover it would peak at 20mA.
The solution was to split my loads into two blocks, each with their own RCD, and now a much healthier 7mA leakage on each. Tripping resolved.
At a previous house I tried the same trick and I could not fix it. I ended up fitting an expensive “high immunity” RCD, and that solved it.
But also: it is usually a good idea to 1) check the RCD itself for proper working, using a tester (not just the button on the RCD), and 2) actually check your insulation as well, with an insulation tester. May need to get a sparky in for those jobs.