The connector is towards the firewall, BEHIND (from your perspective) the main housing - embedded in the cold air intake side of the housing.
So if the connector and or cars dash has been hit with something or even a flooding situation - this area shows it.
Was the Cabin Air cleaner ever replaced?
IF done on a regular basis - check this time for damages to it - see if the filter or the housing cover for it, when it was serviced, the connector to the back of this - got struck or yanked or the wiring pried against - pulling it off the connector for that resistor.
It sounds like, when you hit the AC an air door moves so the ever so slight movement re-establishes connection on that connector from the movement in the housing itself.
You can see
it here and make up your mind whether you want to do this or not.
In this post, the section shown is for a typical Manual Climate control (3-knob in-console) - not the Auto-Climate system it can have.