Once this policy setting is enabled, users can no longer change the programs currently pinned to the taskbar. Keep in mind that you need to unpin the problematic items from the taskbar before enabling this option. This will prevent users from pinning new programs to the taskbar. Select Do not allow pinning programs to the taskbar and enable this option.Then navigate to User Configuration, select Administrative Templates, and then click on Start Menu and taskbar.Unpin the problematic programs from the taskbar.
If you’re using Windows 10 Pro or Enterprise, launch the Group Policy Editor and tweak the Taskbar settings.
Many users confirmed they solved this problem by editing the Layout XML file. Contact your IT admin for more information. That could explain why you can’t permanently unpin your apps. If you’re using a computer managed by an organization, maybe the domain policies prevent you from unpinning certain apps from the taskbar. Unpinned Apps Keep Coming Back to the Taskbar Check Domain Rules