A formal declaration of independence would force Beijing to either resume war with Taiwan or lose face domestically.
Pretending that your homeland isn't technically a real country is a small price to pay to prevent insane Mainlander nationalists from launching a flurry of DF-41s into the heart of Taipei.
China his indisputably reneged on both agreements since 1997. Virtually nobody in Hong Kong or associated with Hong Kong would have accepted the 1997 handover if they had known in advance.
This should be borne in mind by anyone evaluating whether to trust China on any important agreement in future.
"I am altering the deal. Pray I don't alter it any further" comes to mind.