I had the exact same problem, and it seems that installing Xbox game bar and Xbox app from microsoft store seemed to help, but didn't fix the problem.
But then, opening up the Xbox app, in the bottom, there is a yellow bar saying something similar to "This PC is missing required dependencies."
Click on it, and you should see something like this:
Click install on all of the things that need to be installed, and once they are done installing, it should work.
I had the exact same problem, and it seems that installing Xbox game bar and Xbox app from microsoft store seemed to help, but didn't fix the problem.
But then, opening up the Xbox app, in the bottom, there is a yellow bar saying something similar to "This PC is missing required dependencies."
Click on it, and you should see something like this:
Click install on all of the things that need to be installed, and once they are done installing, it should work.