As mentioned in the comment, last time it was discussed (approx. 2 years ago), it was not implemented. Your best bet is to post on the Unity forums and hope or pray a Unity dev can give you a more recent answer or at least a nudge in the right direction.
MS did recently release the Windows/Xbox Game bar SDK to third parties though, but you'd most likely need to implement or port it manually somehow. Then again, there is no evidence it could be easily ported to Unity, so maybe a Unity Dev or someone that did it on the Unity Forums can help you out.
Lastly, if you want OOTB support in the engine, you'll have to wait for Unity Technologies to implement it, but keep in mind you'd have to request it. The Unity Feedback platform was decommissioned some time ago and was replaced by the Unity Forums, or at least, Unity Technologies says it's temporary (to quote UT: "this will be the primary source of community feedback until we’re able to get a new, more scalable, and dedicated feedback solution in place").
Still, if you want to have a go, here is the page I am talking about: https://developer.microsoft.com/en-us/games/products/game-bar/ . The implementation seems to be C#-oriented, but developed for UWP. Not sure if you can pull off a Unity build for UWP and "force" the MS SDK integration.
Here are some resources:
- GitHub
- MS Learn
- Xbox One + UWP deployment for Unity <- this might help, although it's aimed at test projects and doesn't include publishing, but maybe you could use it for a proof-of-concept to see if it's worth it or doable.
Hope this helps or at least moves you in the right direction until a better solution appears. Good luck!