1. That appears to only happen with debug view, since with a regular preview you can detect touch way outside of the window, even returning negative touch coordinates
2. It's relatively safe to assume that since a regular preview works fine, it will also work fine after export. In that case you can probably just check along the lines of "if touch.X < 0 OR touch.X > viewportWidth OR touch.Y < 0 OR touch.Y > viewportHeight
3. If you think of any touch device like a phone... how would you ever touch something that's not on screen?
The only question is why this behaves differently in debug view, but it has probably something to do with the interface of the debugger.