Check if the 'Gaming Services' service is actually running from an administrative CMD prompt...
sc stop GamingServices
sc start GamingServices
As reinstalling Gaming Services & the XBOX app didn't work, you could create a new local user account temporarily, then just add your M$ account to the Store & not profile-wide (pretty sure you'll get a prompt about adding the account system-wide); just click "applications only." This is so the XBOX & other related apps can update to their latest versions. Try disabling the 'Windows Firewall' temporarily & try logging in again; remember to enable it again, though it should auto-enable again after 5m.
Also, for future reference, instead of the laborious AI steps detailed above for repairing/fixing troublesome UWP apps, RMB 🪟 click 'Installed Apps' @ the top, find the troubling app, RMB 'Advanced Options' scroll down, and try a 'Repair' first, then 'Reset' if repair didn't work, then as a Hail Mary try 'Uninstall' and then reinstall via the M$ Store.