Using VisualEditor, I can make a change and without saving switch to source editing. All changes made transfer over.
Going the other way, using source editing, I can make a change and without saving switch to visual editing. I get a confirmation "Cancel | Discard my changes and switch", and if I choose discard, it does discard unsaved changes.
Not sure if this is a bug that this functionality isn't working, or if it never has, and if this is a feature request. I'd love to be able to go both ways.
I do notice that when going from VE to source, it goes to "action=submit&veswitched=1", and gives a preview of changes, so I'm thinking there's an easy path to go this way by VE just submitting the page in preview form. Perhaps there isn't really a way for source mode to send unsaved changes to VE, since VE doesn't have within itself a preview differences functionality.