DwmSetWindowAttribute should be passed true/1 or false/0 as int.
Currently we pass DWMNCRENDERINGPOLICY.DWMNCRP_ENABLE which just happens to work cause it's also 1.
See: https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute