Russia wasn't kicked out for invading Ukraine, just to be clear. Russia was kicked out because they no longer have a free press, which is a requirement for participation.
You can call it a pretense if you want, but that's the official reason, not the war.