First, there's a difference between preserving character and preserving demeanor. If you're walking around in-character at a con, sometimes it's okay to drop character and keep demeanor when someone engages you in conversation. It's basically picking and choosing which parts of the character you want to display. If your character is super chipper all the time but is super flaky and forgetful and somebody asks where the bathroom is, keeping in perfect character means not knowing where the bathroom is and letting the person wet themselves. Keeping demeanor means keeping the super chipper attitude but dropping the forgetfulness and telling them exactly how to find the damn bathroom, even taking them to it if they're especially lost. If they REALLY need help, dropping the demeanor and character entirely and acting like yourself is just plain logical.
I tend to walk around in character until I observe an indicator that the person speaking to me doesn't want me to be in character. For instance, if someone asks how I sewed my skirt, I'll drop character (maybe keeping demeanor, depending) and tell them what they want to know. Pretending my Sailor Scout uniform is magical even when asked a dozen times if I used a certain fabric is just obnoxious. However, sometimes people will approach and ask me things about other characters in the show or similar, so it's clear that they want an in-character response. At the murder mystery theater, people would often try to ask me how I got my acting job... that was a call for character dropping (so long as my supervisor was out of earshot). But when they asked things only my character would know, all bets were off and I'd burst into random song if I felt it was appropriate. Sometimes people love that. But the SECOND someone looks annoyed when I talk to them in character, I drop everything. Every. Thing. Some people are just more receptive to it than others and you're liable to get punched if you annoy someone who lacks that key sense of adventure and indulgent fun.
I cosplay Velma and I've been asked a dozen times where Daphne is when I walk around solo. I've trained myself to instantly respond with either a frustrated "She's been kidnapped AGAIN!" or an enthusiastic "It's a mystery!"--same when they ask about the boys or Scooby. People like that my reaction is in character and I know that they didn't *really* want to know that Daphne had to work all weekend and couldn't make the con this year. You just have to find that right balance, I suppose, because walking around looking for clues everywhere would be tiresome indeed. Although I did stalk around with magnifying glass to the ground for a good ten minutes last ACen, Daphne tra-la-laing on my heels. Eesh.
The second a camera comes up for photos the character comes back full force. The second it drops, I thank the person even if my character wouldn't do that. It's just courtesy.
Aaaaand... I'm sure there's more but right now I'm blanking. Whoops.
These are some great suggestions! It reminds me of the Cosplayer I heard of that did the Onceler that was an actress that did a whole improve skit for a fellow congoer that looked really tired. After she was done she dropped it and answered a lot of questions.
Would you suggest for people to practice their demenor and lines before trying to go in character?