At the time I posted that, I had only seen this occur with Firefox. However, since then, I found the same issue in ungoogled-chromium. I tested gedit since you mentioned it in particular, and it happens there as well. I also tried Marco (mate's default window manager) instead of Compiz, and it... usually doesn't suffer this issue? There were rare occasions where it would bug out and place window decoration with a large gap around Firefox, despite disabling title bar in Firefox settings. Compiz would consistently place a gap around Firefox, and the title bar would frequently appear despite my settings, however I selectively disabled window decoration for Firefox in Compiz settings to get around that. I'm unsure if this issue is related to Firefox at all, although I don't know where this could even be reported.
Ironically, as I was typing this, the rare Marco issue I mentioned happened again. I can't produce it consistently, re-enabling title bar in Firefox settings will act normally without a gap. I've attached a screenshot of this issue occurring on my personal setup.