Invading countries with a diplomatic alliance like NATO behind you is as close to "okay" as you can get. A small country got beat up, but there was no risk of WWIII. And there was an attempt to install a democracy in place of a dictatorship and get out.
China claiming the territory owned by their neighbors is about slowly stealing land (and sea) and making them part of China. It's completely different.
But really, the US's moral high ground is a distraction. This thread is about whether China is taking actions that could be a threat to the United States.