Hey there,
it seems that there’s a lack of context of how you’re performing and which end you’re performing the logout.
If you’re developing a web app or something similar the natural way to perform the logout would be using keycloak’s official client and from its instance perform keycloak.logout();
However if you’re trying to handle the session your own way maybe consider revoking the token as someone else was trying to perform the task in this thread: Revoking offline token as the client
Hope you solve the matter 