Inverter changes 12 volt DC to household AC current. Then you probably plug in a converter (phone plug) to change that 120v AC current back to the DC current the accessories and lights use. Inefficient.
Look up mechanical solenoid switch for 12 volt DC
Get a third battery. If power needs are small use a small battery like a building Exit sign rechargeable battery, if big, then an RV size battery. Connect wiring through the solenoid to the 3rd battery (internet search that, never google). When truck is running all 3 batteries are connected together and all get charged. When truck is off the 3rd battery is not connected to the Truck's battery and you can use and deplete your 3rd battery all you want and still be able to crank the truck. A dead battery will suck the life out of your other two batteries when the truck is running again and the alternator, so know that. Try to not run it dead.
I had this set up with a 3rd and 4th battery (two 6 volt golf cart batteries) when I had a slide-in camper. It worked great. I still have the wiring in place, but no camper anymore…