Both the alarm screen as well as the "enter share info" modal prompt for confirmation when navigating back regardless of whether any changes have been made in the first place, as well as when the "save" button was actually pressed right before.
This is independent of how back navigation is invoked (back button on modal, close button on modal, back swipe gesture).