Depending on the theme, if there was a header,
the border ends up painted lower than it should be,
and clipped by the header.
7-Zip file manager, the reason why the offset was added in 5f0dcf79185941c4faff35d1cc9c758160f3a27d in the first place, still renders correctly.
Before:

After:

--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1878
The check was dropped in e392e0ac2846edc25610723c19d6a796372017e1, leaving the dwFlags variable unused.
I have no idea if it was indeed unnecessary or if it was dropped by mistake but either we need to keep the check, or we should remove the variable.
--
v2: winex11: Check pixel format flags in X11DRV_wglChoosePixelFormatARB.
opengl32/tests: Test wglChoosePixelFormatARB flags filters.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1828