Hi Stephen,
Use Leave action widget: https://appstore.home.mendix.com/link/app/78474/
This widget accepts Microflow as a parameter. In the microflow, you can pass the object and rollback it.
As far as my experience with the widget, it works in most of the cases. There are few corner cases, where it have some issues due to various browsers handle the browser events differently.
May be you can find the corner cases and fix it my changing the widget yourself.
To keep things simple, i always make sure the navigation menu is not available to the user while editing. So edit inside a blocking pop-up, or a page based on a pagetemplate without menu.
In this way the user is forced to choose either save or cancel before continuing.