When using in Image layer the style function is on the ImageVector source. I'm not sure you got this right, but I may be missing the code that does that.