If we see from another angle, rightfully Taiwan and Hongkong no longer belongs to China if the victors were smart enough after ww2. Same for parts of China.
If Japan had not lost ww2, these conquered land would be forever under Japan rule. Since Japan ruled these countries and they surrendered, they can say surrendering these countries back to the allies under a different treaty.
Esp for Hongkong, the treaty was signed between the Brits and Qing gov. Come ww2, Japan took it. During this time, it should be considered as the Brits lost HK and with it all treaties it signed. If japs still holding hk up to 97, do you think they will honour the 99 years lease signed by the Brits?
The surrender and return of hk was between Jap and the Brits. It was a wasted opportunity during that time, the surrender terms never state Japan will return all of HK back to the Brits in perpetually.