Intermittent Unauthorized could not fetch and lock tasks REST

Hi, we have observed sometime in the logs the following error comes:

Unauthorized Could not fetch and lock tasks: http://localhost:8080/workflowcamunda/engine-rest/engine/default//external-task/fetchAndLock

However, after some retries, it fixes automatically. is there any fix to this issue?

Thank you,