Isolation via a transfer switch or breaker lockouts is the right solution. If the grid fails and your power inverter shuts down, your house is without AC power.