GitHub is almost forever. Your custom domain disappears when you stop paying the bills, which if you’re an open source developer has a higher likelihood than GitHub disappearing.
One day, we’re all going back to vendoring dependencies.
In the case of a typical software enterprise having your domain gone means that you probably don't care about the code anymore anyway.
Why did we stop vendoring dependencies in the first place?