aaPanel_Jose
The problem has been resolved. I'm not sure if this was the case, but here's what I did. I recreated the mx record for the domain by setting the "Recorded Value" to mail.mydomain.com. Previously, "Record Value" was mydomain.com. Without subdomain.
After that I was able to add SSL cert for mail domain. The error did not occur anymore.