As per description, window_set_icon_surface (GM) or kind argument in WindowIconTools.SetIcon (Unity) would let you control that.
window_set_icon_surface
kind
WindowIconTools.SetIcon
Got it working!
Thanks for the quick reply