There are competing ideas. This is even before the complexities of actually prosecution and punishment can be discussed.
One major idea is the concept of sovereignty. This does not mean that a sovereign government can do as it pleases to another sovereign government – but it is fundamentally difficult to resolve. Every sovereign government reserves their right to act in their best interest. What balances this are potential retaliations and the costs involved.
On the matter of complexity. What body has the right to impose “their” definition of what constitutes a war crime, how are such acts to be judged and finally how are “punishments” enforced. Every one of these are hugely complex when it comes to things like war involving different countries.
Certainly “war crimes” cannot be judged on social media popularity or what activists claim or by who considers themselves the “victims”.