On Windows, applications can disable titlebar by extending the client rect to a bigger rect which will cover the area of the titlebar from WM_NCCALCSIZE: https://learn.microsoft.com/en-us/windows/win32/dwm/customframe#removing-the... Our current x11 and Mac driver doesn't handle this case.
Attached is a test case for reproducing the issue.
[hide_caption.c](/uploads/46a725e32569a6a0a929a0f183cf9ed8/hide_caption.c)