When you use a shared Microsoft Store account (with a Game Pass) and a personal Xbox account, you may encounter frequent crashes. The solution to this problem is to disable the process "explorer.exe" for the duration of the game. The task of this program is to automate this.
I took PAXANDDOS's repository for forza horizon and now I will try to add as many games as possible with which such a problem may arise.
This fix is only for the Microsoft Store games. Once exlorer.exe is killed, you are not able to switch between different windows (Alt+Tab) and even adjust the volume. If you want to adjust the volume or something else, enter the Ctrl+Alt+Del screen, everything works fine there.
After the batch file starts, your game will start and after some time explorer.exe process will be killed, it starts again as soon as you exit the game.