The mechanisms that attack one attack the other as well. The apparatuses which exist to de-anonymize communication also remove the ability to definitively keep the content of the communication private, and no government (UK or EU or US, etc) that has proposed a ChatControl-like scheme has ever used a method that did not allow them to do both.
If a porn site checks my ID against a gov database, the gov now knows I went to that porn site. That is a loss of both anonymity and privacy.
If a porn site checks my ID against a gov database, the gov now knows I went to that porn site. That is a loss of both anonymity and privacy.