You can leave it on. It will automatically switch to shore power when connected. You probably have the same inverter I do which is a Xantrex XM1000.
2015 Greyhawk 29MV
Honda CRV toad with Blue Ox baseplate
Ready Brute Elite towbar with braking system
TST 507 Flowthru TPMS