Confession time: I sometimes slip into different accents.
If I'm speaking to someone with an Irish accent, before long I'll slip into a brogue. If they're Polish, I'll adopt Slavic slants.
It can be embarrassing but research has shown I'm not the only person who does this. In fact, psychologists think that we subconsciously mimic accents because we want to empathise with the other person. The 'chameleon effect' can prompt us to mirror body language too.
I've noticed that I fall into a similar trap with writing. Different writers have different rhythms, different sentence structure and different vocabularies. If I start to write after reading a book, then I inevitably write in a similar style.
It's tricky at the start of a new project to find your own voice if it's being drowned out by the pages you've most recently read. Now, I give myself a reading sabbatical until I've firmly established the tone, rhythms and word choices for my own work.
Knowing about the 'chameleon effect' is helpful for character development too. It's not necessary to give characters elaborate vocal tics but it's worthwhile considering their language choices, dialect and tone . . . and then considering how different characters interact and mimic each other. It's not something I'd add to a planning sheet or schedule. It's just one of the many little pointers that I know I subconsciously consider when writing.
In real-life, I do still find myself mimicking accents but now I know this phenomenon has a name and its purpose is rooted in empathy, it's made me a calmer chameleon (sorry I couldn't resist!).