In previous setup I have replaced the DNS with IP in DNS setup and some comment that the certificate was by name only.
So here are the reult of my test.
Setup 1 [cloudflare]
Setup 2 [nextdns]DoH -> https://cloudflare-dns.com/dns-query
Static DNS entry cloudflare-dns.com->104.16.249.249
Certificate are installed for both setup.DoH -> https://dns.nextdns.io/dns-query
Static DNS entry dns.nextdns.io ->45.90.28.0
Test 1
Setup 1 with verify certificate turned off
Memory leakage: No
Test 2
Setup 1 with verify certificate turned on
Memory leakage: Yes
Test 3
Setup 2 with verify certificate turned off
Memory leakage: No
Test 4
Setup 2 with verify certificate turned on
Memory leakage: No
Conclusion.
Memory leakage only using Cloadflare and Verify Certificate on gives memory leakage
nexdns does not give any problem, so I will use that.
Red=Test2
Green= Test 1, 3, 4