https://wayland.freedesktop.org/libinput/doc/latest/pointer-...
A 3840x2160 monitor run at 1x means a framebuffer of 3840x2160.
At 2x, the effective resolution is 1920x1080, and this also uses a framebuffer of 3840x2160.
At 1.5x, the effective resolution is 2560x1440. This is implemented by rendering at 4x (5160x2880) and then downscaling that.
At 1.25x, the effective resolution is 3072x1728. This is also implemented by rendering at 4x (6144x3456) and downscaling that.
The difference between all of these is quite noticeable.
Edit: Apparently Apple has been shipping its laptops with non-integer scaling for a while, which is interesting.
The laptop displays work by scaling down 2x/3x too.
But even disregarding all that - if such scaling can be done without problems with webpages, then clearly there's no technical impediment to doing the same elsewhere. It's not like HTML is magic.