The reason was really silly:
I thought that storing the Client Secret as an environment variable was easier then the multiline certificate and for RS256 I was expecting to find a certificate starting with -----BEGIN PUBLIC KEY BLOCK-----.
But now I set the RS256 with the provided certificate and everything works correctly.
Thank you for your assistance!