Убрать защиту ветки main. Сделать её не Default Branch и не Protected Branch
Потом
#Checkout the branch locally.
git checkout branch
#Rename it locally
git checkout -b branch_old
#delete remote branch
git push --delete origin branch
#push the locally renamed branch to remote.
git push --set-upstream origin branch_old