The direction the air goes is based on vent doors that allow air to flow in different directions. These doors are run on a vacuum which is directed through the switch you use to select the direction. When you push hard on the gas, the engine's manifold vacuum drops. If there is a vacuum leak in the HVAC system, you loose vacuum to the vent doors allowing the air to exit through the defroster vent.
You will need to remove the switch, check for a broken or damaged vacuum hose and check the switch itself for a problem.
Friday, November 27th, 2020 AT 11:07 AM