Hello. You've discovered a bug. I've got multiple comments to try to help you workaround:
DXGI installs a windows message hook based on these flags; but the hook doesn't respect the flags when deciding which functionality to perform.
Another developer proposes:
Try DXGI_MWA_NO_WINDOW_CHANGES instead. See IDXGIFactory::MakeWindowAssociation for documentation. Seems pretty good detailing issues. But, just ask if need more clarification.
DXGI chooses the mode based on the back buffer size, not the client area. Therefore, when the app fields WM_SIZE, don’t blindly pass the sizes passed in the message to ResizeBuffers. Instead, snap the sizes to the required mode size. If the developer doesn’t like the stretch artifacts incurred when the window is resized while windowed, then disable window resizing via the WM_SIZING message. If the developer wants to have arbitrary back buffer sizes when windowed (i.e. track the client area size), then yes, NO_WINDOW_CHANGES and a custom alt-enter handler are required.