Yoda was washing Dooku first of all, he had to restort to dirty tactics to survive.
Hell Yoda was low key gaining the upper hand on Palpatine as well and once again he had to resort to dirty tactics to win. The clone troopers were on the way, Yoda knew he couldn't beat Palpatine and an army of Clone Troopers so he did the right thing, lived to fight another day... or live to train the one who would bring balance to the force, Luke Skywalker.
Not to mention he did all this at the human equivalent age of like 90 bruh, even a 600 year old Yoda washes Palpatine and Dooku on the same night. Even at his old age Mace could only beat Yoda by using his special lightsaber style without that he would get washed too. Respect the grandmaster bruh he probably the third most powerful Jedi ever after Anakin and Luke.
