Unprotecting a protected branch seems to take a long time

I have a weird situation in which I use Gitlab API to unprotect a protected branch, then I receive the expected HTTP 204 response, but then when I do from git git push --delete origin branch_name I get the error:
remote: GitLab: You can only delete protected branches using the web interface.
It seems that in the UI, the branch still appears as protected (despite the 204 response from the API) and only after ~20 min it becomes unprotected.

Please help me to understand what’s going on here.