From man systemd-resolved, emphasis mine:
The DNS servers contacted are determined from
the global settings in
/etc/systemd/resolved.conf,the per-link static settings in
/etc/systemd/network/*.networkfiles (in casesystemd-networkd.service(8)is used),the per-link dynamic settings received over DHCP,
information provided via
resolvectl(1),and any DNS server information made available by other system services.
The resulting list of DNS servers to use is a combination of all these sources. So probably your DHCP server specifies A.B.C.D as the DNS server to use, and test.xxnet.com as the domain to use. That makes A.B.C.D as a connection-specific DNS server, which also makes it the preferred DNS server for that connection.
That also means *.example.com names would be queried from both A.B.C.D and W.X.Y.Z, but *.test.xxnet.com names would be queried from A.B.C.D only, since the search domain test.xxnet.com was (probably) also supplied from the connection-specific DNS configuration (received by DHCP).
You might have to tell your DHCP client to ignore the DNS configuration supplied by the DHCP server.
How to do that depends on two things:
which DHCP client are you using? (
dhclientanddhcpcdare common)are you configuring the DHCP client directly, or is it configured by
NetworkManageror some other network configuration management system?
Please edit your question to supply this information, and I'll update this answer accordingly if I can.