Not sure how you can do that without cutting power from the grid totally. From all I have seen and read (and have installed on my house) and a friend who installs them in another state, if they are hooked to the grid to send back power when they produce more than you are using, they have to be able to be cut off in the event power coming from the electric company stops. Because otherwise linemen working to restore power are working with live power coming back at them.
You can set up an emergency power bus that powers from either grid powered charger or solar powered charger. The system will automatically operate from whatever power is available, and will not backfeed when the grid is down.
This is the mechanism behind your computer UPS systems, just scale it up to a larger size, and power your essential circuits.
Commercial buildings and hospitals have backup power systems. Those systems do not try to power the entire building, just the emergency bus. Switching from grid to backup power is either automatic or manual, depending on hardware installed, and no chance of backfeed.
The equipment running off of solar runs all the time (radio and related communications gear for the most part). There’s no grid tie in. Ham radio equipment is all 12 volts so there’s no loss in inverters.
I do have a fail-over to mains power if the batteries get low and the mains are working.
Go to your circuit panel and pull that big one at the top. That is all it takes. The same applies to generators. That said, local lineman say that they don't care, because they treat every wire as though its hot and proceed accordingly. My issue is that I don't want out of phase electricity operating within my home, so I always disconnect when running the generator.