Exactly the same problem. Wasl looking everywhere to work out why my custom icons would nigh on immediately revert to original. Cleaned out icon cache and did everything I googled.
Nothing worked.
Then I turned off Start 11 taskbar enhancement. Lo and behold, my custom icons re-appeared.
If start 11 taskbar enhancements don't permit custom icons, not much of an enhancement. Quite the opposite.
End of nigeldhill's quote
Do you have the software set to show the taskbar as combined or uncombined but with no text?
The difference is important.
When in combined mode there is a single button for all windows in the app, so any custom icons should be in use. However, when in uncombined mode there is a 1:1 link between windows and taskbar buttons and this means the icon used is the icon used by the window itself, not the app. This is a key difference and also how Windows has always worked where the app icon is only ever used when combined.
When an app is pinned it has no window, so the icon is always the icon used for the app / shortcut.