Indeed it apparently costs close to 10% of their military budget just to respond to Chinese incursions. That's a heck of an incentive.
Also, China's posturing is not just defensive but has an offensive side as well, as seen by the naval bases it has been trying to build across the world, even in Africa.
As of today, Beijing has just one overseas military base in Djibouti – a country which also hosts American, French, Italian and Japanese military bases, some of which also host British, German and Spanish troops. https://moderndiplomacy.eu/2020/08/31/chinas-overseas-milita...