It turns out that the apex for me now works only by accident, because I temporarily changed my custom domain to the apex form. This certificate will not get renewed, however. Only the domain that is active gets a certificate.
That means that with https enabled it is no longer pssible to have the apex and www form of a custom domain work simultaneously at a GitHub page! One needs to decide for one or the other.
As a workaround it was suggested to me to create a CNAME record from www to apex at the domain hoster. This, however, will not work for those of us who want to have it the other way around, that is, the apex pointing to the www form of the domain.
I was told that GitHub might consider other solutions in the future.