Not all roofs are "metal plates", most aren't actually. Either way some roofing materials are rated for as low as 20 years, depending on the climate and how good they were installed they might fail earlier
You'll always have a failing shingle/tile here and there, unless you plan on inspecting the whole structure under the foam every year you could very well miss it for many years.
A puddle in the attic or a wet rock/sheepwool panel will be much easier to discover/fix. A small leak under 20cm of sprayed foam will be a nightmare to locate
Why? It isn't like water will get through metal plates, at least not within many decades.