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.
SPF, a spray-applied cellular plastic, is made by mixing chemicals to create foam. Those chemicals react very quickly, expanding on contact to create foam that insulates, air seals and provides a moisture barrier. When properly installed, SPF forms a continuous barrier on walls, around corners and on contoured surfaces. It resists heat transfer very well and is an effective solution for reducing unwanted air infiltration through cracks, seams, and joints.
If your foam pulled away just a little bit, Jamie, and they were able to fix it with just a little bit of touching up, then it wasn't as bad as the house where I saw this problem. As the last photo above shows, it had pulled away significantly from the studs and rafters, and it was all over the house. This was closed cell foam, and interestingly, it didn't pull away from the horizontal framing members, just the vertical and sloped ones. They did some touch up, but that wasn't enough. I don't know how this one ended up getting resolved. I think maybe the contractor came back and sprayed cellulose on top of the foam.