PKCE S256 challenge mismatch 400 error

Built a SPA using the Authorization Code flow with PKCE. Generated the code_verifier as a random string and created the code_challenge using SHA-256 base64url encoding. The token exchange fails with a 400 Bad Request saying the code challenge doesn’t match. Verified the hashing logic locally and it looks correct. Here is the request body being sent to /oauth/token. Any idea what’s wrong with the encoding?