WARP DoH Linux removing records from DNS answers

When using WARP on Linux in WarpWithDnsOverHttps mode various tools and programs fail mysteriously with NXDOMAIN on some domains. The problem seems to match exactly with the older post WARP DoH breaks “gethostbyname” on Linux

As an example it’s impossible to develop Elixir apps on WARP as the package manager cannot resolve the host. The issue seems to be that in WARP the DNS response is modified - the CNAME record is removed from the answer and placed in the additional section. Applications query for repo.hex.pm and receive a response from dualstack.f2.shared.global.fastly.net.

These example compare between 1.1.1.1 and the WARP DoH interface. (this uses q but any resolver tool will do)

With 1.1.1.1 everything is as expected:

$ q @1.1.1.1 A repo.hex.pm
Answer:
repo.hex.pm. 4m45s CNAME dualstack.f2.shared.global.fastly.net.
dualstack.f2.shared.global.fastly.net. 15s A 151.101.130.2
dualstack.f2.shared.global.fastly.net. 15s A 151.101.66.2
dualstack.f2.shared.global.fastly.net. 15s A 151.101.194.2
dualstack.f2.shared.global.fastly.net. 15s A 151.101.2.2

On WARP the CNAME is removed and there is no relation between the query and the answer:

$ q @127.0.2.3 A repo.hex.pm
dualstack.f2.shared.global.fastly.net. 30s A 151.101.2.2
dualstack.f2.shared.global.fastly.net. 30s A 151.101.66.2
dualstack.f2.shared.global.fastly.net. 30s A 151.101.130.2
dualstack.f2.shared.global.fastly.net. 30s A 151.101.194.2

The CNAME seems to be moved to the additional section:

$ q @127.0.2.3 A repo.hex.pm --additional
Answer:
dualstack.f2.shared.global.fastly.net. 30s A 151.101.2.2
dualstack.f2.shared.global.fastly.net. 30s A 151.101.66.2
dualstack.f2.shared.global.fastly.net. 30s A 151.101.130.2
dualstack.f2.shared.global.fastly.net. 30s A 151.101.194.2
Additional:
repo.hex.pm. 5m0s CNAME dualstack.f2.shared.global.fastly.net.

I got the same issue when pulling mix dependencies. The issue is gone after I upgraded cloudflare-warp to version 2022.8.936. I am on PopOS 22.04LTS btw.