The access token should have a short lifespan (min) and keycloak.js will quickly refresh the token once a request is made. This is only an issue wif amdin logs out, as if the user itself logs out it is detected by keycloak.js even if the user logs out from a different app.
There's also a verify token endpoint that can be invoked to check if token is valid without refreshing it. This will incur extra requests to the server though, so be careful with this one if you have a lot of users. There isn't support in keycloak.js for it, but would be relatively easy to add and I'd happily accept a PR for it. The endpoint is '/auth/realms/<realm>/protocols/openid-connect/validate?access_token=<access token>' it will return the json of the token or 400 with a error description if not valid.