In the last 200 - 250 years, China did not start any invasions or aggressive wars. In fact, just in the last decade or so, there were multiple occasions where some other countries dropped bombs, by accident, in China, and China responded with a stern warning. That’s it.
China summons Myanmar ambassador after bomb kills four Chinese
There were a few number of war/border incidents. All of them were caused by China being convinced that the one of their neighboring countries intended to invade China and occupy China’s territories. In those cases, China would rather fight in her neighbor’s territory, versus her own territory, because that way, her own civilians are protected from the effect of the armed conflicts.
China’s thinking on foreign policy is 180 degrees different from the dominant Western philosophy - China genuinely doesn’t care about other countries’ domestic politics. You see, the dominant Western philosophy describes foreign countries as “good” vs. “evil”, universal human rights, democracy or not, etc. Everybody and his brother have the right and the freedom to mess with you. China views country administration as mostly a technical profession, like cooking. Say you have peppers and tomatoes and basil leaves, but you also have to use sharp knives and hot fire. If you do something the wrong way, who gets burned or cut? Mostly yourself.
You see, bad policies hurt a country itself the most. Say you keep all women uneducated and at home, there goes 50% of your productivity; you use too much violence to suppress dissenters, then all their relatives and friends will want to get out instead of help strengthen the nation; you don’t spend the money providing universal education, you lose the chance to increase per capita GDP; you have an ossified upper class and down-trodden lower class, you lose the motivation and upside potential from all those lower class people. The country almost always hurt itself the most from bad policies. After a couple of years, they’ll see that they’ve made a mistake, and their neighbors are doing better. They’ll learn and they’ll make corrections. That’s the way life is. You don’t need some other country to be yelling “bad cook” for your mistakes and then stick a knife into your belly, telling you that it’s punishment for your mistakes.
Thus China’s international position may be seen as illogical in the West, but makes eminent sense to the Chinese themselves. Basically, do whatever you want, and learn from it, as long as you don’t let the fire spread to somebody else’s house, or stick a knife into somebody else. Ultimately a nation has to figure out how to cook the dish to her own liking.