Could not find a default branch to fall back on

I tried deleting the project in SonarCloud and tried running the action again. I still get “Could not find a default branch to fall back on.”
I can’t see anything special about my repository. I have a branch protection rule preventing pushes to the release branch, but that shouldn’t be relevant here since my Main branch is “main” and the current branch I’m running on is “main”.

If I create it manually without “onboarding” I’m able to get it to work.
However this sets it up with a “master” default branch and my “main” branch as a “secondary” branch.
Is this some issue with SonarQube requiring a “master” branch or something like that?

I tried creating it all over again with the “onboarding” feature (which sets up my branches as they should be) and I get the “Could not find a default branch to fall back on.”.