This question is a bit incoherent.
A had a friend named B when a child. Years later, A bumps into a different person named B but who is mistaken for the former friend by A. You can say
B is not who you think he is.
A had a friend named B when a child. A bumps into this childhood friend years later. You do not perceive the character traits in B that A had attributed to B based on A's knowledge of B as a child. You can say
B is not who you think he is.
The same words can have different meanings. That does not mean that you must choose words that have ambiguous meaning.
In the first situation, an alternative is to be more explicit. For example,
The person named B to whom you have been talking was born and raised in Chicago so he is not the friend named B whom you knew as a child growing up in Santa Monica.
Now it is clear that you are talking about two distinct human beings with the same name.
In the second situation,
B's adult personality seems to be very different from what you described as his personality when you were children.
Now it is clear that you are talking about changes over time in the personality of the same physical human being.
You can elect to avoid ambiguity.