I am assuming from what you are describing this vehicle is equipped with lithium batteries. On vehicles with lithium batteries anytime the main battery disconnect switch is turned off vehicle does need to be plugged back in to power back up. Disconnect switch is intended to be turned off just for repairs or vehicle storage.
From your question it appears the vehicle is shutting down after 30 minutes of being initially started up. If vehicle is not plugged in when this shutdown happens, I would take a guess that the DC/DC converter may be failing after running for the 30 minutes. Ignition circuit diagram can be found here. The DC/DC converter needs to supply a constant 12v supply to keep the battery management system (BMS) powered. In the event power is lost to the BMS vehicle will shut down resulting in the DCL relay to open. When DCL relay opens the DC/DC converter losses its input power. If you had another vehicle this converter can be swapped out easily to see if it solves the issue.
Another thing to check is the F6 fuse in the fuse panel in the front. Fuse more than likely is good but I have seen where the fuse is inserted incorrectly. The leg of the fuse bends beside the terminal it works. But variance in temperature causes connection issue at the fuse. Just remove the fuse and check it out.