Even though iOS 17 was announced a week ago, we're still discovering some smaller but useful new features and changes. One such change included in iOS 17 is greater flexibility that helps protect against forgotten or accidental passcode changes on iPhone and iPad.

In iOS 17, Apple has added a new feature that gives you 72 hours to use your old passcode after changing to a new one. That means you have three days to reverse your decision to change your passcode, as long as you remember your original one. From there, you can create a new iPhone passcode that you hopefully won't forget.
As MacRumors points out, if you enter the wrong passcode within 72 hours of making the change, iOS 17 will prompt you with a “Forgot passcode?” option on your iPhone’s lock screen. Tapping this will give you the option to regain access to your iPhone using your previous passcode .
But Apple always knows that not everyone will want to use their previous passcode. In the Settings app, under the “Face ID and Passcode” menu, there’s also an option to “Expire Previous Passcode Now.” This will immediately render your previous passcode useless, meaning you won’t be able to use it at all.
Previously, Apple required you to use your Apple ID and password to erase and restore your device if you forgot your password. This process still applies even outside of the 72-hour window.
iOS 17 is currently available to developers who are beta testers. Apple will release a public beta next month, followed by a general public release sometime in September. As always, features and changes are subject to change before the final public release.
Information source: 9to5mac.com
