It looks like windows handles scaling when it comes to the desktop, not just scaling DPI but also scaling non-native screen resolutions to fit your monitor.
For games and 3D applications the drivers take over and at least in the case of Nvidia you can select how the driver handles scaling, it can do it on the GPU which gives you several options of how you want to handle scaling non-native resolutions (black bars, stretching, etc) or you can simply pass the original output to the monitor and let the monitors scaler deal with it, that depends on the monitor and what features it supports.
Just from my own testing, windows handles scaling fairly badly, even when it's 1080p -> 4k which gives you a perfect 4:1 scaling (pixel perfect scaling) it can't handle that correctly and you get degraded quality.
It seems to be somewhat of a concern especially now we have 4k monitors and unless you're at 32"+ you'll probably need to use some kind of scaling.