Keep in mind that once the the inverter shuts off it will monitor the power line for at least 5 minutes to make sure that everything is within spec before it restarts. So it’s possible that while the grid voltage was 245V at the time you looked it could have spiked before that which caused the inverter to shut down.
If you have a multimeter or a kill-a-watt or something it might be interesting to try to monitor your line voltage for a bit to see if you see any issues. Although if they are just infrequent spikes it might be hard to catch at the right time.
Do you have any UPS’s? UPS’s will also typically cut over to battery if the voltage goes too high, so if you are seeing the UPS’s randomly cut over during the day that might also indicate that you are experiencing voltage spikes.