Would pointing out that they bear an uncanny resemblance to their alter ego and following it up with a comment that a specific feature is slightly different help my character prevent the people they consort with from realizing that they are the secret identity?
The short answer is, no. Saying, “yeah, but this one thing is different,” underlines how everything else is the same. To be clear this is a bad situation for your character to be in. It jeopardizes their secret, and may put them in extreme danger, if it doesn’t get them killed outright. Now, a character who panics may blurt out, “but he doesn’t have this fake scar on his knuckle!” But, no, it’s not a great way out. At that point, even a simple, “you must have me confused with someone else,” might carry more weight. Not, much more weight, but still.
That said, there’s basically two routes for this question, so, I’ll take a stab at both.
If you’re talking about a character who’s working undercover (either with a group backing them, or on their own), then all of the normal issues come up. If they’re working without some organization backing them, then their best option will be to go in as themselves. Not necessarily to be upfront about why they’re there, but ultimately trying to hide who they are is a recipe for disaster.
For example: if your character is trying to investigate a corporation, then their best option for infiltrating is to get hired, that means they’d need to pass a background check, and get through the hiring process. In all of that, pretending to be someone they’re not won’t really work. The entire system is designed to weed out someone who isn’t on the level. Obviously, there are relevant considerations, but the way in is through the front door and into the HR office.
To be fair, if your character is investigating some kind of criminal conspiracy without any backing, they’re going to need to be very creative in order to avoid getting caught up in any police investigations, while still maintaining their cover identity. As it turns out, saying, “but I was only infiltrating them to find out what they were doing,” is not a particularly solid affirmative defense for waxing a witness. (Writing stories like this require a solid grasp of operational planning. Your character needs to be able to identify their goals, and then set about dismantling the organization in critical ways without blowing their cover. That last part is much easier said than done.)
If your character is operating with backing from an organization that can create a convincing cover identity, that’s different. This could be an intelligence agency, law enforcement, or even some well connected, shadowy conspiracy. If this is the case, the organization has a lot more flexibility to put someone unknown on the ground. Cover identities are a thing, but the critical part is that the people your character is infiltrating never meet the people who actually know them in their day to day life. So, the situation where someone recognizes your character for who they are, is something they need to avoid at all costs.
Also worth noting that, under some circumstances, you could have a character with multiple cover identities, which are drawn into conflict with one another. For example, a character who went undercover in one group years ago, and has since gone undercover with a new group could be in a very awkward place if they discovered an old associate from the previous cover while they were operating under the new one. These situations can quickly get very tangled, and make for fantastic plot complications in espionage fiction.
The other possibility that comes to mind is superheroes. For the flying tights crowd, secret identities are kind of a genre convention. You want your superhero to have a normal life you can switch out to and ground the character for the audience. Which is much harder when your character is also a major mythological figure, the last survivor of an alien race, or a rich boy with daddy issues.
If we’re talking about superheroes, then that’s almost a viable answer. I mean there’s a slightly absurd element to the entire idea of superheroes and their alter egos. People would notice that your character was staggering into work looking like they’d been in a fight with fifteen guys. Alternately, sooner or later someone would notice that your superhero never got injured, never got sick, and didn’t react that time someone spilled boiling coffee on their hand.
Depending on context, there’s a fairly smart critique of superheroes how regularly interact with reporters, cops and other investigators. Their plainclothes allies probably figured out who they were years ago, and keep those secrets as well. Personally, I still really like the Ben Urich line about knowing who Peter Parker is, because, “sometimes you smell like burnt buildings. You know who else sometimes smells like burnt buildings?”
In a context like this, even if your character isn’t a superhero, it’s possible that friends and allies may let their cover slide, if they understand what’s going on. Of course, if they don’t, or are about to make a scene, then they are a threat to whatever your character is trying to achieve.
There are also possible situations where an antagonist may seek to keep information about your character secret. Realizing who they are, but holding onto that for whatever reason. This could be due to conflicting loyalties. It could be they’re planning to use that information to their own advantage. They may even intend to blackmail your character with this information at a later date. It really depends on what their goals are, and their relationship with your character.
There are much better lies your character can use to protect their identity. So, here’s something to watch, it’s about a minute long, and light on the details, but keep it in mind. Someone who is aware of their mannerisms, and can adapt to their current “role,” can become effectively unidentifiable and blend into their surroundings. Specifically, things like posture, body language, preferred clothing and speech patterns (such as verbal crutches), can be far more identifiable than just physical appearance. The original Jason Bourne novel by Robert Ludlum actually talks about this kind of a technique in detail.
None of this will help if you’re talking to someone who’s known you for years, but when you’re walking past a casual acquaintance, they may not recognize you. Also, to be clear, this is a learned skill. It’s not quite as simple as just changing into a clean set of clothes and staggering off.
If you’re going the superhero route, sometimes secret identities get exposed. It can be a major transition in your character’s life, as they go from masked crimefighter to public figure. There’s no hard and fast rules there, on what happens as a result. Partially because there isn’t a real world example, but also because superheroes are such a diverse group to begin with. As with everything else, think through all the possible outcomes. Pick the ones that feel the most natural or appropriate.