Follow these steps until you identify your issue (skip steps that you already have done):
1. MOST COMMON: Enable Apple Sign in and make sure Apple Sign in shows up when "All" is selected, not just "Debug" or "Release" (unless intentional).
2. Double check you are signed into correct team name and bundle identifier and that your bundle id is registered with the correct team. If you have multiple apple accounts, its easy to mix these up.
Make sure your entitlements are correct.
FIRST - check which ones you are using and if they . You can either use 1
entitlements file for all 3 environments or 1 for each.
NEXT - make sure apple sign in is enabled in the entitlements file that you checked in FIRST step. Here is an example of Runner.entitlements with apple sign in enabled.
Make sure there is no error on your provisioning profile
If running on mac, note that you will need to edit entitlement files in the macos folder to have apple sign in. See code change screenshot below that was added to DebugProfile and Release entitlements file within the macos folder.