Afaik it’s basically the same way containers work. The mounts are different for the nix daemon compared to the rest of the system.
Technically, the store is mounted read-write, then bind-mounted read-only on top of itself. The nix daemon just doesn’t have that bind mount.