The order of layers in both components needs to match in order for overrides to be preserved. For example, if you have the following structure in one component: [Icon, Text, Rectangle] and then in another component you have [Icon, Rectangle, Text] layers or even [Icon, Text, Rectangle, Rectangle], Master will not be able to preserve overrides, unfortunately.
Sometimes you also could have an extra wrapping frame which will break this too. For example, if you are using an instance as a base component in one of the components and another component simply has all the contents in it.
In the case above, you can fix this by wrapping vector square in an extra frame. This will make the structures match again. (Even if “wrapper” is an instance, it would still work, since Master considers instances and frames similar objects.)
Do components you are trying to link have matching structures?