The problem you saw with the closed cell foam pulling away like that is due to the heat of the foam was to hot. It was actually curing out and making foam before it could adhere to the wood. The installer wasn't reading his foam correctly. He should of stopped and turned down the heat on his hose temp. Also installers have to be aware that as the sun rises and the temp in attics rises the subtrates get hotter as well. This will cause the installer to adjust his heat when installing the foam as the temp changes thru out the day.
Typical roof coating dry film thickness vary from paint film thickness (plus or minus 3 dry mils) to more than 40 dry mils. This means a roof coating actually becomes the top layer of a composite roof membrane and underlying system. As such, the roof coating is the topmost layer of protection for the membrane, receiving the impact of sunlight (both infrared and ultraviolet (UV), rain, hail and physical damage.
My other question was gonna be this. We ripped all the drywall out after Hurricane Harvey and we found some latent termite damage from some time back. One of the common studs in one corner is pretty well eaten to shreds. I was gonna brace it but then I read about more modern framing practices and I read how each stud is a thermal bridge. So now I'm thinking that I won't bother with it because the house hasn't fallen down and the foam might help a little. Unless you say to brace the stud. Then I'll do it, Martin! :)
I recently did a remodel project for my basement using spray foam insulation. The original builder has used fiberglass, but I wanted the best insulation i could find. We chose closed cell foam because it blocks moisture from getting into the house. It took one day to install and was fumey for about 3 hours. It was pretty cool watching it being done. It comes out as a liquid and then expands rapidly into a foam. It's quick! Then they took a types of saw to shave it flat with the wall studs so we could then go ahead and drywall.