An element of this that's easy to overlook is narrative framing. Sometimes it's less how the character acts, and more how the storyteller treats the character.
I'd say that poor narrative framing may consist of:
- Characters that the audience like or empathise with always vocally forgiving, backing up or justifying that character's actions, never calling them out.
- Anyone who disagrees with their world view will be an easily toppled stawman whose arguments are naive or flat and easily defeated by the superior logic or emotional strength of this character. This character also always gets the last word in an argument, leaving the poor strawman speechless and unable to stop them as they strut out of the room.
- Any character who abandons or loses them undergoes a lengthy trial to regain their favour and respect and will apologise profusely for doing so, even though it really ought to be the other way around.
- Regardless of how their appearance is described or what complete nonsense they spout, or being a serial murderer, all characters who interact with the character behave as though they are attractive, cool, likeable and worthy of respect (and may even explicitly say that they think this way about the character).
- Whatever terrible decisions the character makes, it will have a good outcome, and everyone will act as though this was justified because the choice they made happened to by coincidence be the right one, even if their decisions were actually all terrible and it came out well through sheer luck and coincidence and they could not have known this would lead to this outcome.
In other words, no matter what they do, it always comes out right. They're always forgiven, they're always right because nobody can beat them in an argument because the narrative won't let them, they always get the best love interest even if they did nothing to earn that love because the narrative just hands it to them. They just go around being a jerk and everyone acts like they're cool, smart and attractive for it. In other words, they have flaws, but the flaws never result in them becoming isolated, losing respect of anyone who matters, or failing at their goals; everyone else in the story puts way more effort into being their friend than they ever do. They're like a jerky house cat who poos everywhere, drags dead things into the house, scratches people, knocks over expensive ornaments, wrecks all the furniture and yet the owner is always like "Awww, he's such a sweetie though!" and will do anything for them.
So let's dunk on Sasuke some more because yay! Dunking on Sasuke! He actually started out as a pretty cool character; he was smart and cool, but he wasn't always right, sometimes he was made a fool of, sometimes it would turn out that Naruto's unconventional cunning or strength of spirit outmatched him, and while he was presented as attractive, the people attracted to him were made fun of because they were silly 13 year old girls having crushes on a grumpy prettyboy.
The problem with Sasuke came when he moved to the side of the "baddies" and it was presented as the responsibility of the heroes to bring him back and redeem him. They viewed it as their fault this had happened (IT WASN'T. AT ALL! They went above and beyond to reach out to this guy and showered him with affection), and anyone with a dissenting opinion was shot down, and ultimately would be proven wrong- "SEE, Naruto was RIGHT to believe it was his duty to bring back and rehabilitate this guy because he succeeded!" says the narrative, proudly, "Sakura was right to pine for him for years even after he abandoned her, showed no affection and became a bad guy, instead of getting together with an actually decent guy who loved her like Rock Lee, because in the end he did marry her!" Sasuke really didn't earn any of these things. His actions were selfish and motivated by revenge, and the sheer amount of time and resources that were poured into bringing him back.... we're TOLD it was worth it, but... was it, really? Is he actually that cool and great a person? A lot of people ended up disagreeing and having a sour taste about the whole thing.
Another classic and widely dunked on example: Anakin Skywalker in Star Wars episodes 2 and 3. Hoooooo boy.... "Oh Anakin!" Says Padme, a senator who used to rule an entire planet and has always been presented as a wise and conscientious person and is close to thirty to this like... baby university aged boy, "I love it when you throw teenage tantrums, spout really 2-dimensional political ideas that are kind of fascist and then laughing it off and saying you're joking when I easily destroy your arguments, and talk about how you massacred an entire village of people! I am in love with you!" There's a disconnect here between how this character is acting and how the characters are treating him that's actually really similar to Sasuke. The narrative wants you to believe that this guy has some magnetic quality and to feel like he's a great guy who sadly steps down a tragic path, but it's hard to frame mass murder of an entire village, even of sand people who kidnapped his mum, women and children included, as sympathetic and all about his feelings and something this politically experienced and wise adult woman would forgive and bond with him over.