If you try the same steps in an iOS 26 simulator, this error does not appear.
(You don't need to run Xcode 26, you can install the beta, and make the newer simulators available while running in Xcode 16).