Why not overflow: hidden
Keeping one region scrollable
- The ref is registered rather than the element, because the target is usually mounted a commit later than the lock (portals, open && subtrees). A container that attaches late is still scrollable.
- The registry is shared across instances, so a dropdown opened inside a modal does not fight the modal's lock. Each allowed region stays scrollable while every other lock is in force.