This is a very perplexing issue, especially since it's happening even with borderless windowed mode and extends to Discord screen sharing. The fact that it worked on Windows 10 and started after Windows 11 points strongly to a software/OS level conflict or a very specific interaction with your Alienware AW2521HF monitor and Windows 11's display handling.
Let's break down the new information and delve into more advanced troubleshooting:
Borderless Windowed Mode Issue: This is critical. In borderless windowed, the game isn't taking "exclusive" control of the display. This means the black screen isn't a typical FSE mode switch. It suggests a deeper issue with how Windows 11 or your GPU driver is handling rapid display changes or overlays on your primary monitor.
Discord Screen Share Issue: This strongly supports the idea of an overlay or display composition problem. When you screen share, Discord is essentially creating a capture or overlay on your display. If any interaction within the shared application causes a black screen, it give hints at a conflict in how the GPU handles multiple display layers or active applications. The fact that movement keys don't trigger it, but keybinds that bring up different screens do, is particularly telling.
AW2521HF and High Refresh Rates: Your monitor is 240Hz. While you've tried lowering refresh rates, the very high refresh rate and potential for Display Stream Compression (DSC) with your NVIDIA GPU could be a factor, even if it worked on Windows 10. Some users with high refresh rate monitors and NVIDIA GPUs report issues with DSC and Alt+Tabbing.
Let's do a more advanced Troubleshooting Steps:
Clean Driver Installation (with DDU and Older Driver):
You mentioned trying current and previous versions. Let's be extremely thorough.
Download: Download a known stable WHQL driver from NVIDIA that's a few versions older than what you've tried (e.g., something from late 2023 or early 2024, not a hotfix).
Download DDU: Get the latest Display Driver Uninstaller (DDU) from Guru3D.
Disconnect Internet: Crucial step to prevent Windows Update from automatically installing a driver.
Boot into Safe Mode: Run DDU in Safe Mode. Select "Clean and restart" for NVIDIA drivers.
Install Older Driver: Once back in Windows (still offline), install the older, stable NVIDIA driver you downloaded.
Restart: After installation, restart your PC.
Reconnect Internet: Once fully booted, you can reconnect.
Test: See if the issue persists in games and Discord.
Verify/Disable Hardware-Accelerated GPU Scheduling:
Go to Settings > System > Display > Graphics > Change default graphics settings.
Toggle "Hardware-accelerated GPU scheduling" Off.
Restart your PC and test. This feature can sometimes cause conflicts with certain games or monitor setups, especially if drivers aren't perfectly optimized for it.
Check for "Game Bar" Interference (Even if Game Mode is Off):
Press Windows Key + G to open the Xbox Game Bar.
Go to its Settings (gear icon).
Look for anything related to "Captures" or "Broadcasting" and disable automatic recording or background recording.
Also, ensure that "Open Xbox Game Bar using this button on a controller" is unchecked if you don't use it.
Sometimes even with Game Mode off, Game Bar processes can cause issues.
Investigate Alienware AW2521HF Monitor Settings:
Access your monitor's OSD (On-Screen Display) menu.
Response Time/Overdrive:
Experiment with the "Response Time" or "Overdrive" setting. The AW2521HF has "Fast", "Super Fast", and "Extreme". While "Extreme" gives 1ms GtG, it can introduce inverse ghosting or other artifacts and might be less stable for rapid display changes. Try setting it to "Super Fast" or even "Fast" and see if it helps.
FreeSync/Adaptive Sync: Even if G-Sync is off, check if FreeSync is enabled on the monitor itself. Sometimes there's a setting on the monitor that needs to be explicitly disabled if you're not using G-Sync/FreeSync on the GPU side.
Dell Display Manager (DDM): If you have Dell Display Manager installed, try uninstalling it temporarily. Sometimes monitor control software can interfere.
Test with Only the Problematic Monitor Connected:
Physically disconnect your second monitor.
Boot your PC with only the AW2521HF connected.
Test games and Discord. This helps rule out any multi-monitor specific bugs in Windows 11 or the NVIDIA driver.
Windows 11 Updates (Check for Specific Bug Fixes):
Ensure your Windows 11 is fully up to date. Microsoft sometimes releases specific hotfixes for display-related issues.
Look at the "Optional updates" section in Windows Update; sometimes display-related fixes appear there.
Check for Other Background Applications/Overlays:
Besides Discord, do you have any other applications running in the background that overlay on games or modify display settings? Examples include:
NVIDIA GeForce Experience overlay (try disabling this from GeForce Experience settings).
MSI Afterburner/RivaTuner Statistics Server (RTSS) - try closing these.
Steam overlay, Origin/EA App overlay, Epic Games overlay - try disabling them one by one in their respective client settings.
Antivirus software (some have gaming modes that can cause issues).
Any other screen recording/streaming software.
Perform a Clean Boot:
Search for msconfig and open System Configuration.
Go to the Services tab. Check Hide all Microsoft services.
Click Disable all.
Go to the Startup tab and click Open Task Manager.
Disable all startup items in Task Manager.
Restart your PC. This will boot Windows with minimal background processes. If the issue goes away, you can then re-enable services and startup items incrementally to find the culprit.
Reinstall Discord:
Completely uninstall Discord, including deleting any leftover app data (%appdata%/Discord and %localappdata%/Discord).
Download a fresh installer and reinstall. This can clear up any corrupted Discord files that might be causing screen share issues.
The fact that borderless windowed mode is also affected and Discord screen sharing causes similar issues strongly points to a deep interaction problem between your NVIDIA GPU, the Alienware AW2521HF, and Windows 11's display management. Let's hope one of these more targeted steps helps pinpoint the exact cause.