DNS lookup issue in recent versions

In more recent versions of docker desktop for windows (currently using 4.29) dns lookup breaks down quite often.

Sometimes it is only external connections that fail, in which case I need to restart the whole PC in order to fix the issue.

More recently I noticed internal connection fail randomly. At some point the I get a dns lookup failure for a connection between containers and afterwards it resumes as if nothing happened.

In the container logs I get this error (image based on node:14-alpine):
Error: getaddrinfo EAI_AGAIN scoreexpress-db
2024-05-14 17:10:48 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:71:26)

Not sure since what version this issue is happening.
Any clues on where to look for solutions would be helpful.