Title Bar Problem In Some GTK3 Applications

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.

Same as me...
Althought I using Manjaro Linux with MATE desktop but have same problem

And seems the window not start at Maximum Mode it not occurs. But if it start at Maximum, and backs to the normal state, it will show the weird two title bar with some gaps

Start from the maximum state, and back to the normal window:

Close the app at normal state, restart it, althought I switch to maximum state and switch back, the problem seems doesn't exist.

The second photo I upload at here: