Is it possible for Britain to negotiate with China about not handing Hong Kong back at any point? That'd be the only way to pull off not giving it back without a lot of military buildup in the area and deliberately risking nuclear war. And that would still require China to not change their mind later.
Or for Hong Kong not to become independent and then China casually walks in.
It's a tall order.
There was a proposal by a British governor of Hong Kong, IIRC around 1909, to giv back to China then concesion in Weihaiwei in exchange for changing New Territories lease into full UK ownership.