Okay, I'm really happy that I finally figured out what causes this because it's been driving me up a wall lately. Let's see if I can describe it well xD
Occasionally, I'll try to save a post and it'll tell me to close Code View before I do that - even though it's not open. The only way to fix this is to copy all my changes, reload the page, and hope it doesn't happen again. In fact, it happened just now.
But I noticed something! Just before I was saving that post, I had Code View opened on a different post for editing on the same page. While having Code View open, I cancelled the edit. For some reason the site seems to have thought that it was still open even though it wasn't actively being used, and it told me this in the form of a popup when I saved an entirely different post.
So, TL;DR:
Description: Cancelling a post while the Code Viewer is open prevents any other posts on the same page from being edited afterwards. The page must be refreshed. Very easy to duplicate.
Error Message:
Browser/Device: OperaGX, PC.