That’s really difficult because that would mean being more receptive to their influences and develop new experiences, interests and hobbies even whether if you like it or not. Not easily done but can be a good way to develop strong perspective taking empathy, especially if you have to write about a character that isn’t like yourself. It’s really the only other way to avoid a Mary Sue self insert.
That’s also true in work environments where unless if things get really bad you have to cooperate with everybody else. You may not always like it but you have to respect or tolerate it. That can lead to more interesting casts where the protagonist has to deal with supporting characters without demonising or marginalising them. It also makes it more realistic and believable if the character has to work with or save them at all.
Saving a character that’s really annoying can be more interesting than killing it because it could have a second chance. Writing for others means being able to respond to their influences for better or worse and reach out to everybody else. Again it’s hard but practically gratifying for one’s career and social skills.