I use Ubuntu Mate 21.04 as OS and Marco as WM. Some GTK3 (and I think GTK4 too) apps with header bar or custom title bar, create a title bar frame it separately from the app. This also happens when I hide the title bar in Firefox and Chromium. This problem does not always occur to me.
This is gnome-boxes.