Hello and thanks for using Just Answer.I will try my best to help you with your question.
Your problem is caused by a vacuum leak. 99% of the time it is the vacuum canister which is mounted under the evaporator case under the hood on the passenger side. There is a plastic vacuum canister and check valve that keeps vacuum applied to the AC system when you accelerate. Engines create no vacuum under acceleration. The vacuum canister and check valve will need to be replaced to repair the problem you are having.
If you look under the hood on the passenger side of the engine where the washer reservoir filler cap is, you will see a thin black plastic vacuum line behind it that runs along the wiper cowl and disappears between the right front inner fender well and the AC blower motor. That is the vacuum line that runs from the engine intake manifold to the vacuum canister and check valve under the evaporator case,
The AC does not stop working, only switches from the main vent distribution to the floor and defrost outlets, remaining cold
The actuators that control the air flow through the dash vents, defroster vents and floor vents are vacuum controlled. When they loose vacuum, the return to the defrost position which is a built in safety feature so there is always defrosters to clear the windshield when it fogs up.
The temperature door is an electrical motor, so it stays where to set it on the temperature setting for the AC.