I had a same problem on my iPhone 15 Pro Max (iOS 17.4.1) using Xcode 16.1.
Pressing the "Verify" button in "Settings" did nothing; the alert just blinked.
I rebooted the device, but it did not help.
Somehow, I noticed that the location was enabled. When I switched it off and tried again, the verification succeeded.