"Allow the Home button to cancel alerts. Pressing Home while an alert is visible exits the app. It should also produce the same effect as tapping the Cancel button—that is, the alert is dismissed without performing any action. If your alert doesn’t have a Cancel button, consider implementing a cancel action in your code that runs when the Home button is pressed."
How does one affect the behavior of the home button?
Even built-in apps do not do this.
https://developer.apple.com/ios/human-interface-guidelines/ui-views/alerts/