Unable to fetch fetch anonymous token - "*.docker.com" certificate is not standards compliant

Issue type

Invalid certificate while running docker build trying to pull image base from docker.io preventing docker build from building the image.

ERROR: failed to solve: ruby:3.2.0-slim-buster: failed to resolve source metadata for 
docker.io/library/ruby:3.2.0-slim-buster: failed to authorize:
failed to fetch anonymous token: 
Get "https://auth.docker.io/token?scope=repository%3Alibrary%2Fruby%3Apull&service=registry.docker.io": 
tls: failed to verify certificate: x509: “*.docker.com” certificate is not standards compliant

OS Version/build

MacBook Pro Apple M2 Pro MacOS Ventura 13.6.7 (22G720)

App version

Docker version 26.1.1, build 4cf5afa using Docker Desktop 4.30.0 (149282) for MacOS

Steps to reproduce

Add line to dockerfile

FROM ruby:3.2.0-slim-buster

docker build - < Dockerfile

Cert evaluation errors for SSL with hostname https://auth.docker.io/:

Already tried:
ensuring proper Date and Time
Rebooting
Updating system to Ventura (not going for Sonoma yet)
Updating Docker Desktop
Checking Keychain certificates that could be conflicting
Adding crt.sh | 12594892125 manually