I’ve been working on a fork of GLFW and added the ability to toggle the window's dark mode.
I’ve tested it on Windows 11 and it works perfectly; plus, the change is dynamic—it can be toggled at runtime.
Unfortunately, I can't contribute directly to GitHub due to a ban (which I hope is only temporary), so I’ve uploaded everything to Codeberg.
https://codeberg.org/Jyukat/glfw
I hope you find it useful.