Method 1 : Download and Install the Standalone Windows Update (It is Windows 10 but it works for 11 too)
- Go to https://www.microsoft.com/en-us/download/details.aspx?id=48231
- Scroll down and find the Orange download button and click it
- Select the Microsoft-Windows-MediaFeaturePack-OOB-Package_x64.msu and click on Next
- After it does download, go to your downloads folder and run it.
- After it is completed, Restart your PC.
This is what fixed it for me.
And I just have to say it is pure embarrassing that Microsoft don't put out a fix for this.
"Oh the recording functionality of the game bar doesn't work. Oh well."
It's like the entire of this website doesn't have a single MS employee actually monitoring and escalating obvious issues.