You mean, can you force a shapeshifter to stop impersonating its target? There is no foolproof way to do that as far as I'm aware. The key is how well they know their subject. If they're simply copying a shell then they won't know details. Even if they are able to know details via telepathy or concentrate study, unless they're able to completely replicate a subject, they'll make mistakes. Think of a deep cover agent. Every person has unique signifiers - tics, tells, things that make them who they are. An agent attempting to impersonate someone else must copy those things as near to exactly as possible, enough to fool their most intimate friends and family. I've met very few who were perfect, and even they couldn't replicate all of their subject's memories. The best way to catch a shapeshifter is to treat them like a double agent and catch their mistakes.
Without knowing further specifics, that's the best I can offer.