It's the ECU computer that's shuts it off based on the RPM of the engine. My truck does the same thing.
You see the higher the rpm, the more air the engine needs and all the flaps that open and close for cold or hot air just goes out of place. check the rpm on the engine to see where it is, when the car is parked of course to be safer, with the ac on, see where the rpm is when it turns the air to hot air, because your car should shift to high gear, make sure it's not in overdrive. On these newer cars it could be as simple as a overdrive button or lack of vacume in the system. Also check for any recalls.

