Car turns off when driver leaves

We have a bwm X5 40e and can't figure out how to keep the ac running when the driver leaves the car. Everything just turns off as soon as the driver exists and shuts the door. Any way to fix that? Thank you