Instead of seeing "you have unsaved changes, do you want to leave", there should be a save button on that same unsaved changes window.