[edit]
According to HN you can totally do this and I'm just wrong.
Most solar installs work by tying into the existing main breaker of the home.
The cheapest way to do this is to leave the line feeding from the power meter to the main panel untouched. Instead you do anti-islanding detection at the inverters, and when they detect that mains is "down" they automatically cut off to prevent trying to backfeed power to your whole neighborhood during an outage (dangerous, not a good idea).
---
Second issue - there are many appliances that are NOT happy about being turned on and off at random times, and it can significantly impact their lifespan (ex - refrigerators, acs, computers, washers & dryers, etc).
So given the variability of direct solar, you don't want to accidentally destroy your ac unit by having it turn on and off 100 times as random clouds float by.
---
But! If you're willing to install even moderate battery capacity (and LFP is getting quite cheap as well). Then you can absolutely do this. It's just more complicated and more expensive.
You need to wire in a mains relay (~$1,000 depending on the unit) and install some battery capacity to prevent very frequent startup/shutdown, then go through some painful additional signage and labeling requirements (at least in most of the US) and also install some additional shut-down switches on the exterior of the home (ex - to automatically turn the inverters off, and to shutdown the battery system).
Then, yes, you can absolutely stay on solar power while the grid is down. In the same way that people are allowed to run whole-home generators to stay online when the grid is down.
Where I live, on sunny days, the grid goes over 253V (230V nominal +10%), so in order for me to generate anything, my inverter disconnects itself from the grid.
[0] It is becoming way more common now, though.