Not sure on your model, but some applications have a temp sensor that makes the fan (for radiator) cut on and off. Do you have a clutch on your fan? Can you turn the fan when the engine is off? If most systems run hot with A/C on, its mostly a cooling problem, something is not telling the cooling devices, to work harder. Possible belts slipping. If all this is OK, Im thinking radiator needs removing and cleaning and flow checking by a radiator shop. It sounds like with the A/C on, its puts a load on the engine and something is wrong with the engine system causing it to run hot, radiator, engine, etc. I sometimes get a little long winded on some issues, so bear with me and hope it helps. Example, with A/C off, and the machine working hard and in the right gear, what is the engine temp????lets say its 195 degrees, with the A/C on it may cause the engine to work harder and hotter. Again, not familiar with your machine, but it sounds like a water flow problem (radiator, water pump, engine block, oil cooler, after cooler, hose colapasing, etc) if engine has a problem, like excessive wear, etc it will run hot under a load.
look at bottom of water pump and see if you see and water or rust. If a pump is bad, it could be sucking air and you will have less cooling.
I have had radiator hose suck together, under a load.
look inside radiator and see if you have good flow (engine running and up to temp) be careful doing this.
When the engine runs hot, there is a sensor for the A/C system that cuts the A/C compressor off, to prevent high head pressure
Good Luck