When Japan invaded Hong Kong [3] in 1941 during WW II, the city fell after a bit more than two weeks.
Lastly, China is for historical reasons extremely protective of its territorial integrity (because loss of land often presaged the demise of a dynasty and subsequent disarray, and the touchy "century of humiliation" during which many territories were conceded to foreign powers [3b]), as you can see in its attitude towards Tibet, Xinjiang, Taiwan (China promulgated a specific law in 2005 authorising "non-peaceful means" if Taiwan seceded [4]), and HK and Macao. (See [5] on the contrast of the CCP vs western attitudes - not only can Californians discuss secession if they so wish, but Scotland, Quebec, etc. could vote on secession. Unthinkable in China.)
[1] https://en.wikipedia.org/wiki/Water_supply_and_sanitation_in...
[2] https://hkfoodworks.com/research/food-supply/
[3] https://en.wikipedia.org/wiki/Battle_of_Hong_Kong
[3b] https://edition.cnn.com/2020/06/29/asia/china-separatism-ind...