Modern clients match the host name only against the SAN list (DNS names and IP addresses). The Common Name field alone is no longer enough for them; Go, for example, rejects such a certificate.
SubjectAltName (SAN)
The certificate extension that lists the DNS names and IPs it is valid for.