Proper assembly thermostat housings.

The correct gasket will overlap the edge of the thermostat. When you tighten everything down, I think that will hold the thermostat from moving. But even if it doesn't, I wouldn't worry about it. Even if it has room to move around, it certainly isn't going anywhere.