This is an unfair comparison. macOS doesn't run at that resolution out of the box. Your max effective resolution is 1680x1050. Even a 15" rMBP has a max effective resolution of 1920x1200. So, 1080p is plenty competitive for dev work. Now, if all you care about is the smoothness of HiDPI, then your point is valid, but most of us care more about how much code we can fit on screen than how smooth the font looks.
I had 4k screens on < 14" laptops and I prefer 1080p. Pixel density is enough for my eyes, no scaling issues and battery runs longer.
If a high-res screen is critical, check out the HP Chromebook 13 G1 which has a 3200x1800 screen. You can find the 8GB RAM model for around $400 refurbished. Comes with ChromeOS but you can also install Linux distros via Crouton.