Welcome to 2CarPros.
Believe it or not, the two can be connected. If the computer loses signal from the engine coolant temperature sensor, it will turn off the AC because it doesn't know if the engine is okay or overheating. If overheating, it removed the load of the compressor from the engine.
With that, first check the connection on the sensor. If everything is clean and tight and not corroded or damaged, chances are the sensor is bad or the wiring under the insulation has been somehow affected. I would at that point replace the sensor.
Please keep in mind there are other things that can cause the sensor issues such as the power-train control module, but the sensor is the cheapest and easiest thing to replace.
I attached a picture of the sensor and location below. I circled both the sensor (left side) and connector (right side).
Let me know if this helps.
Thursday, October 24th, 2019 AT 7:23 PM