so temporary fix is to download and use any external java like Adept OpenJDK 16
switching to external java fixed it
I am having the same issue.
To elaborate, before the new launcher came out, we had to set javaw.exe to a dedicated GPU either in nvidia settings or windows graphics settings. After the microsoft launcher was released, the java location was changed. I was able to open the folder with "javaw.exe" using task manager file destination function, but setting it to nvidia GPU in both nvidia and windows control panels did nothing. Minecraft is still using intel HD. A possible workaround is using external java but I didn't test it and I don't know what impact on performance that would have.
Tested in both completely default vanilla minecraft 1.17.1 installation and in a 1.17 fabric profile.
Here is the java location
C:\Users\%Username%\AppData\Local\Packages\Microsoft.4297127D64EC6_8wekyb3d8bbwe\LocalCache\Local\Microsoft\WritablePackageRoot\runtime\java-runtime-alpha\windows-x64\java-runtime-alpha\binChanging it to high power doesn't work.
I am using Microsoft Store launcher, and the potential workaround doesn't really make sense because I can't open Microsoft Store launcher since it shows the error in question