Characters. Ah, yes, the bane of any writer's existence. Sometimes they just will NOT behave! Or they behave badly. Or they... (fill in the blank).
Here's the problem - you cannot jam a character into a pre-set mold that you've extensively outlined. If you really want to write realistic characters, you have to set your "mileposts" in your story and trust your characters to get you where you want to go. Sometimes they'll detour, but as a writer, sometimes you have to trust they know where they're going even if you don't.
Note: this is not the same as having a detailed character outline, if you're a writer that needs to use such a tool. I'm talking plot outlines at this point.
Have you ever read a story where the characters suddenly seemed to lose their brains and behave in ways totally contrary not just to how they "should" behave inside their constructed universe, but contrary to how they should logically behave based upon their established character (and even based upon "real life")? That's a clear sign of author interference. And I'm not talking a situation where you WISHED they'd done something different, but a situation where up until that point in the story they acted one way, then it's like they were forced by the story to behave...weird.
As an author, your job is to stay the heck out of the characters' way and let them tell the reader the story. Your job is to record the story. When your fingerprints are all over the story, it means you didn't let the characters do THEIR job.
The few times I've gotten totally blocked when writing it was because the characters clearly wanted to go in a different direction than I'd originally planned for them to go, and I was trying to convince them otherwise. Once I let go of the story and let the characters take over again, all was right in their fictional world.
So sometimes, even though they're not "real," your characters DO know best.