Hello Roko Perković,
You have already done a thorough job checking the Store, Xbox app, services, WAM packages, and network components, so I would not repeat those steps.
Because web sign-in works but Windows-based Microsoft account dialogs fail, the next useful test is whether the issue follows your Windows profile.
Create a temporary local account under Settings > Accounts > Other users > Add account, select I don’t have this person’s sign-in information, and then choose Add a user without a Microsoft account. Sign in to that profile and test Microsoft Store sign-in there.
- If it works, the original Windows profile’s authentication state is damaged, and moving to the new profile is the practical fix.
- If it fails there as well, the issue is system-wide. The next step would be Settings > System > Recovery > Fix problems using Windows Update > Reinstall now, which repairs Windows while keeping your files, settings, and installed apps.