Most US homeowners policies are indifferent to it. Friction appears in two narrow places: a claim on an unvented roof assembly is harder to assess because the sheathing cannot be seen, and rot traced to a bad install is a maintenance exclusion rather than a covered loss.
More detail
The premise is mostly imported. As with the resale question, much of what circulates describes the UK insurance and lending market rather than this one. Standard US homeowners policies do not exclude spray foam, do not surcharge for it, and in most cases do not ask. Where real friction exists, it is worth understanding precisely. Claim assessment on an unvented assembly. If water reaches the sheathing under foam, it is not visible from the attic and it does not show as a stain the way a vented attic would. By the time it surfaces the damage is older and larger, and an adjuster investigating cause has less to work with. That is not the carrier disliking foam; it is the physics of a concealed assembly. The maintenance exclusion. Every homeowners policy excludes gradual deterioration, rot, and neglect. Sheathing that decayed because foam was sprayed over wet material, or because the thickness was insufficient to hold the sheathing above dew point, fails as a construction defect, and construction defects are not covered perils. That is the same reason a slow plumbing leak is treated differently from a burst pipe. What removes almost all of it. Confirm the substrate is dry and the roof is sound before anything is sprayed. Confirm the thickness against the dew point calculation for Climate Zone 5A rather than a default number. Photograph the deck before the foam goes on and keep the images. Keep the product data sheets and the installer credentials. One practical step for an existing foamed attic: if you are ever unsure whether the deck is dry, a moisture meter reading through the foam is inexpensive and settles it. Ask your carrier directly what, if anything, they want disclosed. Most say nothing, and having asked is worth having.