What foam is best for sealing radiator pipes in floor to prevent mice from getting in?
No foam product will stop them, they will just chew through it. Some of them will eventually kill the mouse, but there's always another one, and another one, and another one to pick up the task and eventually finish it.

Aluminum or steel flashing is the only tried and true method. I've tried steel wool, it didn't stop them. They didn't chew THROUGH it, but they grabbed onto it and pulled it out.