Currently, the Flatten Selection command works in such a way that it removes all selected layers and creates new one. This brakes any internal links that Figma uses while working with components, ex. icons. As a result, you need to manually recolour all instances of an icon component after merging layers in the parent icon.
I found a workaround to merge layers properly:
- Cut all layers except the 1st one.
- Select 1st layer.
- Enter vector editing mode by pressing Enter.
- Paste.
This preserve Figma “links”, but require much more actions than a simple Cmd+E.
Please make the Cmd+E to work in a way described above or something similar.