This isn’t true at all and I’ve complained about it before but the go maintainers introduced a big breaking change in the x.509 standard library that caused a lot of scrambling.
https://github.com/golang/go/issues/39568
As far as I know every other language standard library still allows CN to be used to validate the hostname when the SAN field doesn’t exist.