Condensation occurs when warmer moist air contacts a cold surface like the metal frame on your window. A foam tape will cover the cold metal surface and prevent contact with the moist air. You may still get some condensation as the exposed surface of the tape cools.
Condensation is an indication that the air inside your unit is too moist for the temperature, maybe from using your stove or other sources.
Opening doors and
windows briefly to "air out" the unit and get rid of this overly moist air often helps. Increasing the temperature inside the unit may also help.
Otherwise you will likely continue to get condensation on cold surfaces like window panes, metal surfaces etc. You may also notice your clothes, bedding etc may feel damp.