It's great you have a workaround, but I wonder what the root cause is. It seems like a combination of: there are some addresses your machine cannot reach something about yarn tries one address, but does not try others? Or is it that you have public and private v6, and something is picking the private v6? It seems that things should work without explicit configuration.
Attachment:
signature.asc
Description: PGP signature