It is so painfully obvious that George lifted all these characterizations from the 1930s-40s era cinema he’s so fond of, which was absolutely loaded with unambiguous racist caricatures, and then applied them in a well-meaning but very poorly considered and tone-deaf way decades later in his own work. I don’t think Lucas had a racist agenda when he made the prequels, I think he was a kind of clueless sixty-something year old guy with no one to tell him how dated and awful this stuff was.
That could describe most of his 1997-2005 output.