I also had this issue with the beta and now with the public release of iOS 17. My phone is a corporate managed device and this issue only occurs when I'm in the office so I'm pretty sure it has to do with keychain/certificates that grant me access to our wifi.