The thing is those characters still did morally dubious things under the belief they were helpful to a well meaning cause. THAT is where the Anakin Skywalker link is meant to be, but the problem is that while Anakin suffered the emotional weight and consequences of choices that, in spite of manipulation from other forces, HE still made, the anime always goes hand waves it as being completely and utterly the manipulator's fault and the character in spite of still doing things they knew weren't 100% right, being withdrawn of any fault.
Even with her sympathetic excuse, Florges was still a ruthless character that came to immediate conclusion of just attacking and throwing everyone out of the area where water still remained. While it was revealed to be Team Rocket's fault she didn't have any in the first place, she still made that choice on her own and little implied she was even sorry about it before or after. Alain had more pressure but he still succinctly captured Z2 and left it to be tortured and experimented on by Flare. Basically sympathetic motive for dubious action is not the same as 'completely not their fault'.
This happened even in many basic 'antagonistic COTD' situations, like the two Pangoro episodes or the Zapdos one in XY. They didn't know how to have the twerps handle a not-totally-evil-but-still-antagonistic character so just brought in an eviler character to simplify it. That's less developing or resolving the problem and more just enabling or forgetting about it, which doesn't make the twerps feel very effective as protagonists. Even besides that, the characters don't really get any development from this runaround, gullibility is rarely called out as a flaw in the anime since so many plots are reliant on the likes of Team Rocket easily duping people, so after a while it just becomes formula driven fluff. Making bad guys the impetus of the story often just becomes an excuse to make the heroes chess pieces that don't really drive the plot themselves or rely on much of a unique personality. Every single episode, they get easily duped the same way and then the villains get easily overpowered the same way.
SM is guilty of simplifying grey situations as well (eg. it's complete castration of the Aether plot, though one could argue they still called out Lusamine for letting it all happen) but I guess the thing is they don't make such 'complicated' situations the centre piece all the time, and more often just go for what it CAN do well (cartoony stories) and try to use it to it's full potential. Sure solving the UB problems through trickery is kinda anti climatic but at least it's not absolving it's characters of any noteworthy involvement, they still have to do something that requires more than two brain cells compared to a one sided battle against Team Rocket. Also the UBs being non-malicious antagonists is at least SOMETHING along the lines of a grey situation that is acknowledged, since the protagonists try actively to work around that and succeed.
To try and bring this back on topic at least slightly, I feel this is why SM feels at least remotely helpful to Ash's characterisation since it shows he can be versatile. He can improvise and be crafty without using his usual niche of battling all the time, and in some cases not even use his Pokemon. It shows how he can have effective moments as a protagonist outside his goals, meaning him losing said goal all the time doesn't make him seem like an unaccomplished character.