Britain made a big mistake turning Hong Kong over to China. What they SHOULD have done is grant it independence like Canada and Australia, then told China, “Go talk to THEM and see if they want to join you.” And if China had THEN tried to take HK by force, the world would have stepped in (they keep rattling the saber at Taiwan, but have never tried to invade it).
You miss the point, which is that when it took over Hong Kong to protect the narcotics trade being plied by rich Britons in China, Britain signed a Ninety-nine-year lease. When the lease expired, China got back Hong Kong.
A similar situation existed in regard to the Panama Canal. When the lease expired, we had to hand the canal back to Panama.