There are a few ways that anti-islanding systems can work, but it's reasonable to imagine that the inverter is measuring the impedance between its output and a nominal AC source: the power grid. If that impedance is too high - and it will be unless you've got a rather large generator - then the inverter will not source power.
What about just using batteries?
Typical auto transfer switches are fast enough that computer equipment etc won't notice.
Edited to add: if you want truly uninterruptible power then you should do what data centres do: everything runs off the UPS all the time (well, all the computers, maybe not all the cooling system), the only thing that changes is the supply: either mains, batteries, solar, or generator. Or some combination of batteries + the other three.
Back in the 00s I visited a DC that two very large flywheel UPS that were being trialed to replace the battery room.
Though I imagine eventually battery tech will take over.
I don’t know if anyone is building systems like that though?
PG&E had a transformer fire which caused large voltage swings. The flywheels kept the generators turning, and the ten Diesel engines started OK. Then outside power came back up, and after a time delay, the Diesels shut down. Then outside power failed again, and because of a timing incompatibility between the power control and engine control, some of the engines would not restart that soon. There was a minimum "off" time on the engine; it had to stop before it could be restarted.
The engines that did start were not enough to handle the load; they overloaded and their controllers shut them down, shutting down the whole data center.
[1] https://www.datacenterknowledge.com/archives/2007/07/24/gene...
What's your source for the first part of this phrase?
Dave Jones has a good video on it (well series to a degree): https://www.youtube.com/watch?v=SoeVNaz7KGc
Magic smoke is injected into electronic components at the factory, in order to make them work. If you let the smoke escape the package, your part has failed permanently. But as long as the smoke remains inside, there is still a chance you can repair any failure by cooling the part off for a while.
Huh, where can I read about this?
A couple links:
https://yubanet.com/regional/pge-shutting-off-power-during-h...
https://www.mercurynews.com/2018/06/12/pge-could-shut-off-po...
https://www.sfchronicle.com/business/article/For-PG-E-cuttin...
https://sacramento.cbslocal.com/2018/06/25/pge-cutting-power...
1: https://www.almanacnews.com/news/2018/07/25/pge-may-cut-powe...