On Windows and MacOS and iOS and Android the GUI toolkits are aware of the scaling factor and draw themselves appropriately. It has nothing to do with the compositor.
Some legacy apps on Windows are indeed scaled like you describe, resulting in a blurry mess like on Linux, but they are few and far between.