Can not remove stale branches

I have an active repository with stale branches that I have not noticed before.
I think they was created by gitlab when one of the users made a change to the repository with the build in file editor.
They have auto generated names and look like this 0a9cc10e66e4e7e48bf7a7fc302e5dc25dd21416.

The issue is, I don’t know how to remove this branches.
Gitlab UI return code 400 when I press on the “Delete branch” button.
And git cli failing as well.

git branch --all

* master
  remotes/origin/0a9cc10e66e4e7e48bf7a7fc302e5dc25dd21416
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

git push origin --delete 0a9cc10e66e4e7e48bf7a7fc302e5dc25dd21416

remote: GitLab: You cannot create a branch with a 40-character hexadecimal branch name.

Can you please help, maybe there is a workaround for this issue.