This is why you want a trusted secure hardware boundary.
The Apple Pay payment flow on iOS/watchOS requires you to double press the power/side button to authorize a transaction, which userland apps can’t intercept.
Similarly the camera activity indicator on iOS appears somewhere on the screen that regular apps can’t display pixels to (the Dynamic Island, on most recent iPhones)