The hell they can't.
I had a company spray my wall pockets last year.
They showed me photos of other customers who had critter damage after they sprayed.
They now offer their customers 2 different spray foams.
One that is bitter tasting and repels critters from chewing through it,and one that doesn't.
You now sign a release if you opt for the latter.

Collecting Vintage Sunoco