GitHubのレポジトリのトップから「Settings」直下の Default branch から変更します。
すでに main ブランチでコミットがある場合は以下のようにしてローカルもリネームします
git branch -m main develop
git fetch origin
git branch -u origin/develop develop
git remote set-head origin -a
GitHubのレポジトリのトップの「Settings」 →「Branches」から「Add branch protection rule」をクリックします。
ブランチ名「main」を入れて保存します。
これで main から develop にマージを行った時の main ブランチ自動削除は無くなります。
""GitHub Team or Enterprise organization account. が必要です""