We have a post here about how to detect impostors:
I have had this happen - the impostor didn’t mean any harm but I don’t talk to anyone not expressly invited and they lied to get access to me. The thing is, a complete personality and MO change is a bit of a giveaway.
I also consider any spirit coming on to me as a massive red flag and have a strict policy of not getting involved that way with any entity, mainly because it’s a common route for parasites but also because I see sex as for the animal species I’m incarnate into, not the higher being, so it’s a humans-only thing (and dead humans don’t count, no Patrick Swayze’s Ghost for me thanks).
I feel keeping good spiritual hygiene with a bit of self discipline and having basic common-sense policies avoids a lot of confusion and risk.