Authorization not fully cleaned up after history deletion

Hi,
I’m checking the deletion of history process instances in camunda 7.22 (and 7.18) and I found this suspicious orphans row in the authorization table and I’m not sure if it is a bug.

  1. I record the authorizations in a temp table.
  2. I start a process-instance, complete a couple of tasks, then delete the process-instance.
  3. I use POST /history/process-instance/delete to delete the history of the process.
  4. If I check what rows have been left In the authorization table I find those for the history tasks that have been created for the process, but the history tasks have already been deleted.

Is there a reason I don’t see for why these records are kept?

Thanks