I think I’m running into a similar problem. I thought it was because I used a sub-subdomain (Let's Encrypt with sub-subdomain?) but I tried it with a regular subdomain and the cert is still not generating for the new site.
I’m trying to figure out how you hacked it to work, but I can’t seem to follow
What did you do to make it work for you?
If it was this, which of the if statements did you comment out?
Also, any idea what might be causing this new issue?