Fullscreen Exclusive: How to change the native resolution?

DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH Set this flag to enable an application to switch modes by calling IDXGISwapChain::ResizeTarget. When switching from windowed to full-screen mode, the display mode (or monitor resolution) will be changed to match the dimensions of the application window.

https://docs.microsoft.com/en-us/windows/win32/api/dxgi/ne-dxgi-dxgi_swap_chain_flag

Interestingly, the mode switch works correctly without the flag when changing refresh-rates but will not when changing resolutions