What could be the possible reasons of getting "error=invalid_code" in Keycloak Logs

Hi Guys,

I am trying to find a cause to an issue which is "When a user clicks on Forgot password, They receive the Forgot password Link intermittently. I was trying to debug the same based on Keycloak Logs and found a log Saying

type=CUSTOM_REQUIRED_ACTION_ERROR, realmId=XXX5b7c-90c9-4cd8-b68f-27022fd3010a, clientId=null, userId=null, ipAddress=xx.xxx.xxx.xx, error=invalid_code, requestUri=https://Dash.domain/auth/realms/datix/login-actions/required-action?execution=UPDATE_PASSWORD&client_id=https%3A%2F%2FDash.domain&tab_id=INunnzFPOAw, cookies=[]

This invalid_code error occurs for the user which so not recieve their Emails .
Could anybody help me with listing down the possible point where is broke.
Or any other steps that I should follow.

Keycloak version : 6.0.1