I had the same issue and I was able to solve it. When distributing it from XCode you cannot select "TestFlight Internal Only" but instead "App Store Connect".
From the documentation from https://developer.apple.com/help/app-store-connect/test-a-beta-version/invite-external-testers/:
"Builds uploaded as TestFlight Internal Only from Xcode or Xcode Cloud are indicated as internal under the build number. Builds with this indicator can only be added to internal tester groups."