Greetings & Welcome!
Thin, black closed cell craft foam works well for the insides of windows. It’s easy to cut for an exact fit, and will just look like tinted windows from the outside.
There’s a huge problem with spray foam, and insulation in general in vehicles that seems to never get mentioned. Where there’s air, there’s moisture, and spray foam as well as almost every other vehicle insulation job traps air, which means it is also trapping moisture. That moisture then condenses on metal, glass, plastic, fiberglass, and other surfaces, and leads to mold, mildew, and rust. Short of vacuum sealing, or replacing the air with some form of sealed in, trapped gas, this condensation is going to occur. Neither of these options are viable for vehicles which are constantly in motion.
Without any scientific mumbo jumbo to wade through and attempt to decipher, this means you can not have any trapped air anywhere, because it contains moisture. Air and moisture is much more efficient at entering places than it is at escaping them, and the only solutions that actually work are very limited. Anywhere inside your vehicle where than can be air, needs to be ventilated. It needs active airflow to keep that air & moisture from becoming trapped, and that airflow needs to have a path to exit your vehicle. Part of this ventilation process is also referred to as evaporation.
The human body produces moisture via breathing, sweating, etc. Using propane is also a very large producer of moisture. Humidity is a measure of how much moisture is in the air. In the end, it is impossible to keep air and consequently moisture out of our vehicles, so the best we can do is deal with it.
Dry heat combined with active ventilation is a common and effective method of combatting condensation/moisture build up. In the summer, this dry heat can be provided by the sun. The problem is that in the summer, in high humidity areas, we can have ample heat, but still have moisture problems. In this case, we need to attack the problem differently. Condensation (the accumulation of water) occurs when there is a temperature difference between an object and the surrounding air. With air conditioning, or some types of swamp coolers, the heat exchanger is much colder than the surrounding air, so the moisture in the air condenses on the heat exchanger. That moisture can then be trapped in a reservoir, or be drained to the outside. Regardless it will remove moisture from the air, lowering the humidity as well as the temperature, making both you and you vehicle more comfortable.
The bottom line is we need active airflow to every inch inside a vehicle, and especially to the inside of the vehicle skin. The only exception to this is if we are wicking the moisture away from the skin, to the interior, where is can then be evaporated out. Vehicle manufacturers use both schemes, and defeating either is a very very poor choice.
Insulation only works with active heating and cooling, and the down sides of most insulation attempts far out weigh any benefits. (Mold, mildew, & rust) Both heating & cooling works with or without any added insulation. Shade in the summer, sun in the winter, combined with adequate ventilation is usually far more effective than any amount of insulation.
"The less you have that CAN go wrong, the less you have that WILL go wrong!" ~Murphy