Editor logs me out unexpectedly: "Session Expired"

I was working on a post in the editor when it suddenly logged me out with a “Session Expired” pop-up.

I lost quite a bit of editing work, which is really annoying.

What could have caused this? I makes me very reluctant to use the editor if I have to resort to saving every minute. Feels like the nineties all over again, for the wrong reason.