The only way to clear it is to restart the gateway unfortunately.
There was a change in 8.1.20 (changelog) that should have resolved this issue.
Are you able to consistently replicate it in 8.1.24? Does it have to do with designer sessions disconnecting as noted in that release note?