How is violating the Sino-British Joint Declaration and getting away with it "losing ground"? The Hong Kong protests failed and Hongkongers now have less freedom than before.
I don't think they got away with much. Even if foreign investment rebounds in HK, Western complacency toward China will not find its voice again for many decades, and in that time, every Chinese treaty negotiation will be viewed as a bad-faith caricature of real diplomacy.
[0] https://unctad.org/system/files/official-document/wir2020_en...