Hi my name is ***** ***** I will be happy to assist with this today.In some cases I may need more info to assist better.I apologize for any delay.My info is somewhat limited on your model here but I had seen no one else has responded and would like to see if I can help here.If at any time you feel that I cannot help with this please let me know.
Most likely the ac is shutting down due to the engine going into a "limp mode" as some models the computers will shut down the ac operation.
It sounds like when you are under a heavy load when more power is needed the computer is putting the vehicle into a limp mode due to an issue it sees occuring with one of the engine or transmission components.
On some models I have seen loss of fuel due to injector,fuel filter or injection pump issues cause this here,restricted exhaust component in some cases cause this,egr valve on some models will cause this.But there are several sensors and components on the engine and transmission that will also cause this like temp sensors for both engine and transmission as a possibility.
What has to be done from here to help locate and repair this fault is to have the fault codes read out/checked with a fully compatible scan tool to see what codes are set.Once this has been done any codes set need diagnosed to help locate and repair this issue here.
If this is an over heat issue I have seen the engine cooling fan as an issue as well as debris in the radiator or ac condensor or bent fins on one of these causing air flow restrictions and an over heat issue.I have also seen water pump impellars wear and cause loss of coolant flow or low flow and cause this as well.
If more help is needed, use the reply tab to continue our conversation. If no further assistance is needed, kindly rate my service,your 5 star rating is appreciated.You can rate at any time and we can continue to work on your question as this will not close out your question.Keep in mind in some cases it can be difficult to fully diagnose or help repair your vehicle without seeing it and I work on delivering the best possible answer from what I see to work with.