Windows isn't a good example as it's implementation is stupid.. there are about 3 of them that yield different results, and they have to be be implemented by the apps.. a proper dpi scaler would be done at the OS layer not forcing apps to implement it.
The result is that some apps do it right, some half do it, and some not at all. If you're developing and you pull in a library it may or may not be hidpi compatible and even if it is it might use a different method so not be in sync with your app, leading to bug reports and annoyances for users.
A better example is mobile where the UI system was written to scale from the ground up and you largely don't have to think about it.