A Soyuz has two (three?) compartments.
- The Orbital module at the top which has the docking probe and the main door.
- The Descent module in the middle that is where the crew resides for launches and landings.
- Propulsion/Service module at the bottom. No room for people, but fuel, equipment, etc. (So is it really a compartment? Or more of a 'module', whatever you want to call it).
There is a hatch between the Orbital and Descent module, of course, since the Orbital module is dumped before reentry, the hatch on the Descent module must be sufficient for exposure to the atmosphere, space, everything in between plus reentry.
Thus I imagine, if they are sheltering in the Soyuz they probably close at least the Orbital modules hatch to the station, since they would need it closed to depart the station anyway. But they have an extra hatch if needed, in the descent module. This of course is a distinct advantage that Soyuz has over ATV, HTV, Dragon, Cygnus, CST-100, and Dream Chaser (Who the heck knows what Blue Origin is really doing) in terms of other craft visiting the station.
It is unclear if in an emergency they could discard the orbital module and leave it attached to the station and depart in just the Descent and propulsion modules. Nor is it clear, what they would do after that to recover. I imagine, worst case they could fashion a grapple point for the CanadaArm to the Orbital module to 'throw' it away. Of course, if it ever got that bad, who knows if there would be a recovery for the ISS.