1) It sounds like your desktop resolution is set to 2560x1440, not 3840x2160.
2) Also, not sure why you'd run Windowed but obviously fullscreen will fix this issue as well.
3) You can also choose to go in the NVidia Control Panel and set:
a) scale by aspect, and
b) scale on the GPU (not monitor)
That always outputs the monitors native resolution and adjust everything to fit, though if you set 2560x1440 in the desktop that won't change. It would still be rendered as such, converted to 4K then sent to the monitor.
(whether to scale on monitor or GPU depends whether one is faster or better than the other. I don't see any difference but others might)