Color change when swap components

Hello,
Is there a way to preserve a specific color in a component when swap one of its child elements? For example, consider a button. As shown in the screenshot, the button uses text and icon colors from a palette. Initially, all icons are set to #000, but I applied a color override in the button component. Shouldn’t the icons retain the overridden color when swapping? I noticed some svg attributes, but it seems attributes related to currentColor are not being passed

Figma offers a solution for such overrides: by maintaining the same naming and nesting structure, color changes during swaps are applied correctly: