Just came back here to say that I retract what I said here in this thread. I’ve realized for awhile now that it wasn’t Lucas’ intent to have a character arc for Yoda in the prequels in which he realizes that war is wrong.
Lucas’ intent was to show that the Jedi participating in the war was hindering their values, even if they had no other choice. Yoda, like every Jedi, was put in a tough spot, in which he was forced to fight. It’s not about Yoda learning to be non-violent (he’s the same in the prequels as he is in the OT), but about the Jedi being put in a no-win situation, as elaborated in this brilliant Quora answer.
https://qr.ae/pvuA2y
As George elaborates (in this quote he’s responding to a question asking if the Jedi are like police officers).
GEORGE LUCAS: No. They’re not like cops who catch murderers. They’re warrior-monks who keep peace in the universe without resorting to violence. The Trade Federation is in dispute with Naboo, so the Jedi are ambassadors who talk both sides and convince them to resolve their differences and not go to war. If they do have to use violence, they will, but they are diplomats at the highest level. They’ve got the power to send the whole force of the Republic, which is 100 000 systems, so if you don’t behave they can bring you up in front of the Senate. They’ll cut you off at the knees, politically.
They’re like police officers. As the situation develops in the Clone Wars they are recruited into the army, and they become generals. They’re not generals. They don’t kill people. They don’t fight. They’re supposed to be ambassadors. There are a lot of Jedi that think that the Jedi sold out, that they should never have been in the military, but…
PAUL DUNCAN: Do you think that?
GEORGE LUCAS: It’s a tough call. It’s one of the conundrums of which there’s a bunch of in my movies. You have to think it through. Are they going to stick with their moral rules and all be killed, which makes it irrelevant, or do they help save the Republic? They have good intentions, but they have been manipulated which was their downfall.