If the secret is invalid, expired, or contains special characters, it usually results in an "invalid client secret" error. Therefore, please check if your client secret has any of these issues. If it still doesn't work, I recommend generating a new client secret and trying again.
Additionally, if your app is a public client app, you should not use a client secret, as it is only available for confidential client apps.
Hope this helps.
If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.