Thanks. I should have mentioned that I am not charging when this happens. I did find a setting for smart preconditioning. The car learns your schedule and starts to air condition the car early. I turned that off. There is also a setting in case your car gets over 105 degrees. I turned that off too. I will see what happens.
I sometimes use this setting to keep the climate on when I'm stopped for a short time and want to keep the interior cool or warm. I noticed that if you do switch this setting to keep climate on when leaving the car, it automatically reverts back to the default "climate off on leaving" when you next enter the car (which makes sense). So I would doubt this is causing your issue as you would have to deliberately switch this setting to "on" every time you left the car in order for climate to remain on.
More likely to be smart preconditioning, over temperature protection or a fault!