So this article suggests not using a CNAME DNS entry and pointing your domain’s APEX entry at GitHub’s IP. You could also use an ALIAS record to point the ‘www’ part to GitHub too, though only a few DNS providers support ALIAS.
[0] https://help.ns1.com/hc/en-us/articles/360020248973-About-CN...
It goes beyond that -- "ALIAS" isn't a DNS record at all; it does not exist as an entity within the DNS protocol. It's a directive used by some DNS servers (primarily at large providers) which causes the DNS server to synthesize A/AAAA records.