Thank you for replying.
This looks like something similar. It has now happened twice, and I’ve switched to a text editor.
I find it amazing that WP’s developers choose to allow this to happen, when popping up a page saying “You have logged out, here’s your buffer to copy and paste” or even finding some way to pass the buffer until after login is not difficult to do.