I think the point of the OP is that HK is in a fairly bad situation to survive as an independent state with
one potentially
hostile neighbour. Nearly 80% of HK's water supply is imported from China [1]. Only about a quarter of food imports are from China [2], so the situation there is better. But what if China were to close the land borders and impose a maritime blockade? It wouldn't be pretty.
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...
[4] https://en.wikipedia.org/wiki/Anti-Secession_Law
[5] https://www.chinalawblog.com/2020/06/on-secession.html