Again, Britain wanted to get rid of Hong Kong (but with good grace) and handing to the ROC will see the PLA at Hong Kong harbour within hours. The thread is well into ASB territory.
Particularly with a hundred years to play with I'm not sure if ASB is really fair, it's certainly very unlikely but thinking about the steps that need to happen. For Britain to hand over Hong Kong to Taiwan you'd need it to be
(we start at illegitimate it's a lease and the 'landlord' is clearly the PRC with the terms of the scenario meaning we can't just cheat and have it be nationalist China
(people need to actually want this to happen both the Public of Hong Kong, general British public and enough of the international community, it starts unacceptable people were generally apathetic in Britain, in Hong Kong a lot of people were pro China, and the wider world wanted decolonisation)
( the hardest one how to avoid the PLA just marching in)
So taking it together how can we achieve those three requirements with only a minimal butterfly net
The simplest way to get legitimate is probably turning the New Territories from a lease to a permanent acquisition, given the island itself already was this doesn't seem impossible. It would be slightly easier pre-1900 (Just have the relevant peace treaty go a different way), but especially early in 1900 (pre-World War I when Britain still in peak Empire mindset), Seems perfectly possible for a dispute with the Chinese government to get out of hand (possibly a failed attempt to curtail Western influences, in the area around Hong Kong to get the lease itself in the minds of British negotiators) have a brief additional round of gunboat diplomacy and as part of the latest humiliating treaty take permanent control of the new territories. This doesn't feel like it would drastically disrupt the flow of things it leaves Britain China and the wider world in about the same position as it was before. This also makes the timeline more conveniently flexible without a fixed date to hand it over we can place the actual transfer date at any point post-war (with the below scenario I'd guess the 70s or 80s is most likely)
Then for acceptable I would say have nasty trends in communist regimes in the Cold War, de stalinization fails or never even really gets going, less reformist (and also less practical/capable economically) voices win out in the PRC itself. Leading to the West doing a bit better in the Cold War (easier to present itself as the reasonable partner to 3rd parties) having a bit more resources spare, and having both the Warsaw Pact countries and the PRC much closer to, large better off North Korea's than what they actually became. So at this point Hong Kong is a speck of freedom with a heavily militarised border every now and again a few brave refugees managed to sneak through, a major British tabloid take this up as a series of stories about the brave Hongkonger, which becomes a general trope in British public perception. So we now have people in Hong Kong don't want to join China as they can see how bad it is, the British people have a generally warm disposition towards Hong Kong, and there is still a unified enough Cold War style western faction to have enough friends, to back something other then returning Hong Kong
Finally possible, an assertive America, already helps with this a lot, as does a really ghastly PRC which probably makes seeing Taiwan as a government in exile more appealing to the west (the idea it may just collapse and their be able to come in seems more possible), and finally a less wealthy PRC would reasonably be less likely to be able to advance its nuclear program at the same scale and pace so I suspect it would have nuclear weapons it seems reasonable to assume it has a smaller stockpile and less effective delivery methods making any possible conflict with either the USSR or the West more one-sided. But I think the most important final part of this is maintaining the Sino-Soviet split. Given they've both stayed in a authoritarian direction, it can't quite be for the same reason, but still feels personally possible for them to fall out could be as simple as the two rulers having a personal falling out, or possibly the PRC leaning even more hard into an anti colonialism message, and leading to increased competition with the USSR about satellite/friendly states in Asia. Either way the key thing is the PRC needs to be worried about its northern border and certainly not confident that the USSR would back it if it decided to go all in.
Bringing this altogether In this scenario the UK really doesn't want to hand over Hong Kong to the PRC, but between post-war decline and Let's say a Labour government that is legitimately quite keen on decolonisation it would rather not hold on to it indefinitely (not to mention there's always the worry things will flare up and there would be a war with the PRC), so after negotiations with Taiwan they hold a referendum with one of the options being joining the Republic of China which wins by a narrow margin. The world holds its breath but despite significant sabre rattling and possibly some raids/terrorist activities sponsored by the PRC the handover happens and the Republic of China declares it has a reclaimed a province of China, the already heavily reinforced/militarised border (after all in this scenario the west has been reinforcing Hong Kong in case of a possible Chinese invasion for decades) a substantial US naval presence, and fear of the USSR to the north stops the PRC from intervening at least immediately.
Unfortunately I doubt Hong Kong in this scenario would be anything like It was in OTL probably a lot poorer(no Chinese market to really engage with) and a lot more militarised (and therefore less free e.g. more restricted press)