Keep my garage moisture free

I’ve been told by a metal building supplier that over time, the spray foam will trap moisture between it and the walls and cause the building to rust.

It did a big commercial bldg. I worked in one time , then the spray foam started falling off--------jfi