In this case the priority goes to whatever the cursor is over atm. If it’s over the inner scrollbox that’s the one that will consume the input and scroll (providing it can scroll to start with).
How else would that work? You want a modifier button or an area that is excluded from scrolling so the outer element can take over?