I don't have a strong preference. But, if I had to choose, I guess I'd go with the 4K setup. When I have 3 documents side-by-side, seamless on the ultrawide, it is really nice and clean. But, I do feel the lack of height. At work I tend to have dozens of scattered windows across multiple virtual 4K desktops piled up over the course of multiple weeks. Having multiple columns of very tall code panels in one 4K editor window is very nice when I need it.
The pixel density of the curved ultrawide is annoyingly worse than the 4K. Otherwise it's better, more usable, but the low pixel density makes me want to go back.
I'd really like a similar form factor with 5K horizontal resolution.
The antidote is to calculate your megapixels, and decide accordingly. You would with a camera sensor, so do the same for your displays.