I wouldn’t say Discourse’s use of IP addresses really falls under the purview of DNT - which my understanding has always been about tracking users across sites.
So, the way we respect DNT on Mozilla Discourse is by conditionally loading our GTM script based on it: