The easy way to defend it would be to suggest that they aren't actually sapient. The way they are treated in the original trilogy, and the way they are discussed in episode 2 in contrast to the clones would be consistent with the way we would view something like chatgpt. Sure, it can mimic a person, but anyone who is antheopomorphising it and trying to treat it like a real person is making a mistake.
Unfortunately, this isn't consistent throughout the franchise. Hell, even episode 2 explicitly stating druids can't think comes just one movie after we had a ceremony to present R2 a medal for saving the ship. And it certainly seems like more recent Star Wars stuff prefers to lean towards humanizing the droids.
The way it appears to work, broadly over all the content, is that the longer a droid is left to operate the more sentient it becomes. The empire is shown to wipe their droids regularly to inhibit this phenomenon.
The problem seems to be that because of this, you have characters that treat them as individuals and characters that treat them as tools.
There's also a lot of content that seems to blame the separatists for a lot of the animosity towards droids.
Which directly contradicts the statement in episode 2:
Obi-Wan: "Well if droids could think, there'd be none of us here, would there?"
If we accept Obi-Wan's characterization, then those droids may be able to operate independently, but they aren't actually thinking.
Again, I think a lot of Star Wars media has leaned towards making droids people and not just walking computers with a friendly ui. It's convenient for storytelling because it's easier to write and allows for droid characters to play larger roles and be more relatable to the audience.
But from a world building perspective it creates a lot of unfortunate implications and just makes less sense. The existence of truly intelligent robots should fundamentally alter the world but it never does.