Transference

When you encounter something for the first time, your brain tries to match it to something you've encountered before.

When meeting a person, your brain might notice the particular way this person speaks, their shape, their point of view on a particular subject, and then short-cut to someone else you've encountered once before.

Your brain falls into a pattern of behaviour of responding to the person you've encountered before, instead of the person in front of you.

https://hbr.org/2018/09/understanding-why-we-overreact-at-work