If you’re on X11 then there is a window property that applications can set on windows that should bypass the compositor. GLFW sets this for full screen windows since version 3.0.4, but has no control beyond that. It’s up to the compositor whether to obey it.
You could check whether it helps to set the property on the windowed mode window as well. Run xprop -f _NET_WM_BYPASS_COMPOSITOR 32c -set _NET_WM_BYPASS_COMPOSITOR 1
and click on the desired window. If so, that’s something to look into as a GLFW fix.
If you’re on Wayland, even if running via XWayland, then I don’t know yet.