I agree that it depends on the tone. I also think it's disturbing when a creator becomes so obsessed with another real person that they desire turning them into a character to hurt. I'm not talking about political leaders or abusers. I mean when you turn someone else into an evil, over-the-top character because you don't like them or had a falling out: It makes it look like there's something wrong with you and you're trying to victimize yourself through pity. I've seen this happen occasionally and the creator will purposely make it known what they're doing. Hmm, emotional manipulation? They're almost always a teenager too or mentally unhinged. It makes me unfollow immediately because I don't care about the drama they have with others.
No matter how angry I've been, I don't immediately jump to turning people into characters. It's weird and personally? People who have truly hurt me don't deserve to even be acknowledged in my art.
Also, real people are three dimensional and you run the risk of lying because you want to look 100% good.
I can understand writing about your experiences when you've been hurt (a falling out, breakup, you got fired - whatever) but again, when you lean too far into making characters a personal punching bag - you're losing the plot.