It is contrary to the international legal system. And it's thoroughly argued against by Socrates versus Thracymachus.
>Again, on what basis?
On the basis of UN Charter article 2(4) and (5). Surrender means (4) is set aside if in fact you can start a war of aggression and come out ahead. That is completely untenable in the international institutions that exist right now. And willingly setting aside (4) means (5) has also been set aside. The Charter isn't some aspirational document, it is a treaty countries are legal parties to insofar as their sovereignty was used to acknowledge its truth and their agreement to be bound to it.
141 countries agreed to UN General Assembly Resolution ES-11/1. Russia must withdraw from all of Ukraine. It is in the interest of most countries to agree to this resolution, because it is one of the easiest calls to make since the UN was founded, and why it was founded.
If the UN unravels... humanity has no institutional means of stopping another world war.