Reverting to docker compose v1 (while not optimal) is the temporary fix I am using. To my understanding the resolv.conf from v2 compose you have above is correct [1]. I am looking into that now and will post back if I figure out how that works.
[1] https://github.com/docker/compose/issues/2847
DNS is configured differently when using a custom network (as is the case when using v2 of the Compose file format), but the dns setting is still respected. From the Docker networking docs:
'The IP addresses passed via the --dns option is used by the embedded DNS server to forward the DNS query if embedded DNS server is unable to resolve a name resolution request from the containers. These --dns IP addresses are managed by the embedded DNS server and will not be updated in the container’s /etc/resolv.conf file.