The reason why this happens is condensation. When hot and cold mix, they produce moisture. Kind of like a cup at a resterant, after a while it starts forming dew.
Moisture
Frost forms on the inside of a windshield when warm, moist air inside the car comes into contact with the cold surface of the glass, causing the moisture in the air to condense and freeze.
The AC runs to remove moisture from the air inside your vehicle. Moisture causes the fog inside of your windows. The ac runs to remove the moisture and the heater runs to heat the air.
High humidity levels, installing an HRV will fix that.
It has a bad seal or a crack allowing moisture to get in.
Mold can build up inside cars due to excessive moisture, which can come from sources like water leaks, wet or damp upholstery, or high humidity levels. Poor ventilation can also contribute to mold growth by trapping moisture inside the vehicle. Regularly cleaning and aerating the car can help prevent mold from developing.
Check inside the car undre the dash , check the heater core.
The AC takes the moisture out of the cabin air and that helps clear the inside of the windshield from moisture faster.
Try putting new weatherstripping and check if there is water in trunk or doors
It's condensation caused the variance of temperatures.
Car windows may get wet from the inside during rain due to condensation. When warm, moist air inside the car comes into contact with the cooler windows, the air cools and releases its moisture as water droplets on the glass. Proper ventilation can help reduce condensation by allowing the moist air to escape and the inside of the windows to reach a similar temperature to the outside.
Frost forms on the inside of your windshield when warm, moist air inside the car comes into contact with the cold surface of the glass, causing the moisture in the air to condense and freeze. This can happen when the temperature inside the car is higher than the temperature outside.