Unable to connect to an IPv6-only redis server by hostname

I'm unable to connect to a Redis server when hostname only has AAAA record.

image

Probably the issue is around here, since when debugging the Socket gets created as AddressFamily.Internetwork,

if (addressFamily == AddressFamily.Unspecified && endpoint is DnsEndPoint)

It's then crashes inside PhysicalConnection.BeginConnectAsync with

Exception thrown: 'System.Net.Sockets.SocketException' in Pipelines.Sockets.Unofficial.dll
The requested name is valid, but no data of the requested type was found.

There is a workaround, seems that setting ConfigurationOptions.ResolveDns = true forces to use the IPv6 address directly, but this breaks DNS updates.

Environment: .NET 6.0.8 (x64) on both Windows and Linux
StackExchange.Redis 2.6.48