@tij - tried your settings. so close! note I am on Windows 10 + fall creators update.
the only issue was that 4K movies always rendered 1080p. Verified using madVr.
3D, HDR, windowed mode all worked fine, but madVr would scale to 1080p as long as the desktop was in 1080p. i did check and re-check the settings to match yours, so not sure what else you are doing. I didn't have specific scripts set up to select profile; I had set up shortcuts to test it and despite telling madVr 2D content is always some 2160pXX mode, it would scale to 1080p.
you are correct - and great find - that if you boot up in 1080p, then the OS and nVidia CPLs each will toggle 3D on/off and affect each other as they should; but if one is in 2160p, then the OS 3D toggle has no effect on the nVidia CPL toggle.
i'd call that a bug, though Windows or nVidia I'm not certain.
oh one other thing: some of my 4K movies, particularly Labyrinth, will exhibit rendering artifacts if I set madVr to PC color levels 0-255. If I set to Limited, 10bit, then all is fine. This can be noticed in the opening scene with the cgi owl flying around against a black background. I noticed this from my PS4 as well in various games. sometimes it's subtle, other times it's completely distracting.
so desktop is set to RGB/8bit/Full range but madVr is set differently. setting desktop to 4:2:2 or 4:2:0 and the black level looks washed out as expected.