Hello, SanabilAsrar
Welcome to the Microsoft community.
Thank you for your feedback. According to your description, you don't need gamebar anymore, you can try uninstalling gamebar and see if the problem is solved, please let me know if my understanding is wrong.
Search for Powershell in the search bar, select Run as administrator and run the following command:
Get-AppxPackage Microsoft.XboxGamingOverlay | Remove-AppxPackage
Please wait for it to complete and see if the problem continues afterward. If it continues, the Microsoft community has a dedicated Xbox board where you need to ask questions and a dedicated xbox support person will help you.
Best Regards,
Aaron- MSFT | Microsoft Community Support Specialist