Press Win + I keys to open the Settings window and navigate to the Gaming section. To fix the issue, you can try disabling the game bar and DVR on Windows.
However, many users report that the feature can provoke Gears of War 4 freezing PC. Game bar/DVR is a Windows feature that was designed for the Xbox app to record gameplay and take screenshots.