Monitor limited at 640x480 60 Hz when waking up the screen from slee

Sometime when I wake up the MSI Optix MAG271CQR from sleep, the driver sets the monitor to 640x480 60Hz and I cannot change the resolution to anything else until I unplug and plug again the monitor. The issue only occurs when using Display Port and HDMI is not affected. I also got plenty of these logs from the driver:

[13614.620405] nvidia 0000:2d:00.0: [drm] User-defined mode not supported: "2560x1440": 144 583600 2560 2568 2600 2720 1440 1465 1473 1490 0x20 0x5
[15109.688758] nvidia 0000:2d:00.0: [drm] User-defined mode not supported: "2560x1440": 144 583600 2560 2568 2600 2720 1440 1465 1473 1490 0x20 0x5
[15112.913874] nvidia 0000:2d:00.0: [drm] User-defined mode not supported: "2560x1440": 144 807923 2560 2784 3072 3584 1440 1441 1444 1565 0x20 0x6
[15113.123382] nvidia 0000:2d:00.0: [drm] User-defined mode not supported: "2560x1440": 144 807923 2560 2784 3072 3584 1440 1441 1444 1565 0x20 0x6
[15196.456865] nvidia 0000:2d:00.0: [drm] User-defined mode not supported: "2560x1440": 144 807923 2560 2784 3072 3584 1440 1441 1444 1565 0x20 0x6
[15197.146157] nvidia 0000:2d:00.0: [drm] User-defined mode not supported: "2560x1440": 144 807923 2560 2784 3072 3584 1440 1441 1444 1565 0x20 0x6
[15230.320581] nvidia 0000:2d:00.0: [drm] User-defined mode not supported: "2560x1440": 144 807923 2560 2784 3072 3584 1440 1441 1444 1565 0x20 0x6

I tried multiple DP cables and using the other DP outputs on the GPU and the issue still persists. The only way to get rid of this issue is to use HDMI but I lose VRR functionality.