PM in discourse are just private discussions, they are posts with really limited visibility. They are anonymized in the same way as the more public posts.
The “invites and emails” I mentioned are the email messages send out by discourse for various actions. For example email notifications about reactions to followed discussions.
I am not a lawyer. But it is not that simple. In spirit this mechanism does conform to the guidelines of the Right to erasure from the GDPR, but the local implementing law might not agree.
It also depend a lot on how you use Discourse.
Further more, the amount of data being erased might violate some other laws which require this data to be kept.
If this is really a big concern, like with everything legal, you should contact a lawyer.