accessibilityBoundsInWindowPx
This element's accessibilityFrame (documented by Apple as screen coordinates) converted into window-space pixels — see AxRect for that space and the two on-device bugs that motivate it.
Conversion is into view's window's coordinate space, not view's own. Falls back to view itself when it has no window yet (e.g. headless unit tests, which never attach one), where window-relative and view-relative are the same thing anyway.
scale must be UIScreen.mainScreen.scale — not view.window?.screen?.scale. The source coordinate space below is hard-wired to UIScreen.mainScreen, so scale is the other half of one conversion and the two have to name the same screen. Passing another screen's scale converts out of mainScreen's space but multiplies by a different ratio: every frame lands at the wrong size, no frame contains the tap, and the walk returns null for every tap — silently capturing nothing. The argument exists to make the unit conversion visible and testable at the call site, not to let callers choose a screen.
That mainScreen is hard-wired at all is a pre-existing limitation (unchanged here): it is the wrong screen for content on an external display. Fixing that means sourcing both halves from the same view.window?.screen, which is a behavior change and deliberately out of scope for this extraction.