You are using loginClientCredentialsGrant and we have refresh token mechanism built in the client SDK . So whenever you have 401 it will look out for the expired tokens and try to refresh them. But you need to set the this.refresh_access_token = true; for your 'Configuration' instance. Hope this helps.
you are right. As the snaspshot shot shows the refreshtoken will not be set for loginClientCredentialsGrant. It is available for auth grants. loginCodeAuthorizationGrant.
For loginClientCredentialsGrant if your token is expired , you need to rerun the login function to get a new token exactly like how you got it the first time