Please check in /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory and see if there are multiple account directories present. If there are, then you can try deleting the older one (I think it will start with “7a2f”).
I deleted the older one (there were two directories, the newer actually starting with “7a2f”) and could now successfully obtain a lets encrypt certificate.