> China isn't going to restrict the movement of hundreds of thousands of foreigners legally living in HK.
At least, they are less likely to do so than they are people who aren’t foreigners, although even them I wouldn’t want to bet my life on it.
China ending the two-systems arrangement in Hong Kong despite the Joint Declaration is basically saying “As far as HK (and, implicitly, anything we consider Chinese territory) is concerned, we aren't concerned about what other countries think, or international law or agreements, only power.”