Switch to SNI-based SSL if possible. So you can use Managed Certificates for both the root domain and www subdomain without running into IP address limitations.
You can also try using an external wildcard certificate.
See: https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-domain-ssl-certificates
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Regards,
Abiola