It’s a fair point, but A. in most of those cases, they killed the defenders outside the gates of the city as opposed to having to fight their way in, and B. city walls are far less formidable defenses than castles.
So, no, the Dothraki at their current level of siege technology probably couldn’t take Westerosi castles.