Maybe it is not a whitelist issue like I have seen on some UE forums and I had mentioned before.
If you set Full Screen, and then open up the console and enter 'r.setres 5120x1440' it seems to work.
When I do this, the screen 'flickers' when alt-tabbing and there is a brief pause before any window or taskbar pops up where Borderless does not flicker and the taskbar or other window instantly appear. Any resolution the game seems to run in the background when alt-tabbing from fullscreen but you always see the screen flicker when it changes from fullscreen to desktop.
Brainstorming this issue I'm curious if it has to do with the menu option selecting the highest refresh rate that the game sees which may be different than what is configured on the desktop; 5120x1440 @100 hz10 bit vs the highest which is @120hz 8 bit. 3840x1080 works because it is a completely different display mode and this setup happens to work 3840x1080 @120 10 bit. So when 5120x1440 is set it tries to display 120hz but the desktop was at 100hz, so it defaults back to 3840x1080 if that makes sense. I have had this exact behavior on previous monitor setups in certain games, only an INI setting for refresh rate fixes it, or removing/adding resolution/refresh rates using a tool like CRU.
Another possibility is there could also be a rendering optimization issue with 5120x1440 the game does not like when trying to select in full screen, like the game not being optimized for 32:9, even though 48:9, 5760x1080 works and seemed to work fine. At 5120x1440 GPU utilization is pegged at 100% where 5760x1080 was well under 100%. There is that "Warning" about resolutions above 1080. 5120x1440 is only about a 16% increase in pixels over 5760x0180 so I was expecting similar performance to 5760x1080, but 5760x1080 really hammers the GPU. After multimonitor gaming since around 2003, just kind of learn to live with crap like this with the resolution not working without some INI or console command.
Lastly, while most EU4 games work fine, some do have issues with certain resolutions, some work while others don't, some only work in certain display modes. Fortnite had, or still has issues with 5120x1440 IIRC. I know Doom 2016 works fine (just tried it), and I believe Borderlands 3, ARK, Obduction, Unreal Tournament also work fullscreen 5120x1440 when I had played them previously. Only INS seems to revert to 3840x1080 when selecting 5120x in the menu.