Spurious "Draft is being edited in other window" errors

It happened to me just now and I remembered and attempted to reproduce what I was doing… both times it happened due to me hitting Edit on the wrong post, closing the composer, and then editing the right one.

Here’s my attempt to reproduce it: