Failed to turn code into token error in wildlfy application with Keycloak 21.0.2

Hi! I get this error after logout from Wildfly application which is secured by Keycloak 21.0.2 with OIDC.
It does not happen always, but sometimes I get it. Could someone suggest what is wrong or how to handle it on my own not by adapter because I get white page with “Forbidden” message.

[Server:master_wpro] 10:25:03,286 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-145) failed to turn code into token
[Server:master_wpro] 10:25:03,286 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-145) status from server: 400
[Server:master_wpro] 10:25:03,287 ERROR [org.keycloak.adapters.OAuthRequestAuthenticator] (default task-145)    {"error":"invalid_grant","error_description":"Code not valid"}