Hello! I'm Jen, and I'd be happy to help you out with this issue.
I'm sorry to hear you're experiencing this issue. Try repairing or resetting Xbox, Xbox gamebar and Gaming services app. Select Start > Settings > Apps > Installed Apps > Scroll down and look for Xbox app > Click on three dots next to it and select Advanced options > click Repair. If repair doesn't help, click Reset under the Repair button. Do the same steps above for Game Bar and Gaming Services app. You can find Game Bar by scrolling to the bottom > Click System Components. Reboot your computer afterwards then check if the problem is resolved. Let me know if this solution works for you. If not, please feel free to reply, and I'll be happy to provide further assistance. Thank you.
Best Regards!
Jen :)