The big loophole is the provision for China's intervention in matters of "National Security".
This is exactly what has been used to craft very vague language that basically allows authorities to treat anything that goes counter to China's official line as a "threat to National Security".
It's so vague that self-censorship is now omnipresent in what was, just a few years ago, a bastion of freedom of speech in Asia. Newspaper and political figures are afraid of being targetted for their perceived dissent, and there is no real recourse, with pressure on judges to fall in line.
It is a farce of course, but there will be no international action. The British have no recourse to enforce the treaty. China will invade HK with tanks before they release their tightening grip on it, and the world will watch and do nothing of course.
It's not just democracy that is under threat in HK. There never was any to start with. It's plain freedom of speech that is under threat.