Identity is more fundamental then ideology. People get to choose their ideologies, they don't get to choose their identity.
Identity is negotiated between the individual and society. Some people argue otherwise, that an individual can arbitrarily decide their identity, but I don't think most people agree with this. The Rachel Dolezal [1] case is a pretty good illustration of this.