Windows keeps adding Xbox icon to the taskbar

In order to solve it, I followed the next steps

  1. [Windows Key]+R and write %userprofile%\AppData\Local\Microsoft\Windows\Shell.

  2. Edit the file named LayoutModification.xml.

  3. Delete the following line that has the terms taskbar and Microsoft.Xbox.App (in my case, line 197)

Before deleting...

enter image description here

After deleting...

enter image description here

  1. At last, if you haven't removed the app from the Taskbar too, do it now and restart the computer.

Reference: https://answers.microsoft.com/en-us/windows/forum/all/xbox-app-will-not-stay-off-of-taskbar/e430a077-39fb-4537-9bac-41890c7dee9c?auth=1