Foam Fail, foam is not suitable for sealing rodent holes. Rodents will gnaw right through this stuff, there is nothing in this stuff to prevent them. You need hardware cloth, cooper or steel wool. This will stop them from gaining access.
Now here is the problem, the foam expands and expand and well you got it expands. In some ways you can’t stop this foam from expanding. It also has a solvent in it and it is really messy. If you can control it, very minor squeeze of the handle to limit the flow helps.