I used this method and it worked great for me on windows 11 although I got the solution on reddit.
For those still struggling for the variable value I put "~20000000" and not '~0x20000000' might not make a difference but worth a try as the decimal integer is a completely different value to the hex value provided in the method. It will be worth rebooting the system after putting a new system variable as closing EA (Even in task manager) wasn't enough to fix it. I have read somewhere that someone was concerned about the security of this i can confirm that after you get past the initial crash with the new system variable you can delete it and it should continue to work after, I have played through a full game after this fix was removed from both computers and it ran fine all the way through.
For those who can't get it to work after using the method provided by tufekung I have read another couple of solutions for you to try
First (which I can't see being the issue) is switch from borderless windows to Fullscreen apparently a few have had success from doing this
Second (most likely alternative solution) turn off "share usage data" I recommend a combination of both the system variable and this, whereas the variable worked for me I noticed after turning off share usage data that the mini freeze when creating a lobby disappeared which indicates that could be an issue.
Anyway hope this helps and you can finally enjoy the game :D