So this pretty much affects all versions of Minecraft for me. If I try to alt-tab in or out of Minecraft, my screen goes black for 10 -20 seconds. I have tried many different versions, such as 1.8.9 - 1.17.1. I have tried using a client, and optimize as well. Nothing seems to fix this error. This only started happening when I got my new monitor, which is a 2k 144hz one. I made sure the resolution and refresh rate matched the in-game settings.
If possible, please could you provide some screenshots or videos of this issue occurring whilst the F3 debug screen is enabled? Additionally, forcing a crash by pressing and holding
F3 + C
and attaching the crash report to this ticket would also be quite useful. Thanks! 😃