You can leave an electric cooler plugged in as long as your vehicle’s engine is running. Once you’ve cut power from the engine, leaving an electric cooler plugged into your car can drain the battery.
Typically, you can leave these coolers plugged in for a few hours without much risk of depleting your battery power. The best electric coolers have special features that automatically power down the cooler if it threatens to drain your car’s battery.