I quickly looked at the source code of your ACME client, just before the error message
Let's Encrypt was unable to verify the challenge. ..., there is the keyword "keyAuthorization" used in the generated jws. That keyword is not in use in the ACME v2 protocol, it is part only the ACME v1.
As a consequence the ACME client must be buggy. It is important to fix the client, before going forward.
(here is my client: GitHub - bruncsak/ght-acme.sh: Get publicly trusted certificate via ACME protocol from LetsEncrypt or from BuyPass )