Thats the trouble with having the switch before the inverter , switch goes after inverter
He's got loads he wants to power from either inverter , or mains electric
simplest way forward is to install a transfer switch that can select between the mains (utility) electric and the AC output from the inverter
So only one type of power is getting into the system at any one time, no issues with back feeding