Why Doesn't Color Inheritance Work When Switching Variants via Variables?

As everyone knows, when the layer names of icons are exactly the same, the color can be retained when switching icons.

When I replace Icon 1 in the example with Icon 2, Icon 2 will inherit the color of Icon 1 on the button.

Similarly, if I combine these three icons into one, the color will still be retained when switching between states.

However, when I use Variables to control changes in the icon shape, the color will not be inherited.
This is quite frustrating for me. Why is it that when switching variants through variables, the color is no longer inherited? I would like a reasonable explanation.