Hello,
I got the same problem as you and this is how I solved it.
Put the iPhone in recovery mode (connect the phone to your mac, quick press volume up then release, quick press volume down then release, then keep the power button down until a message on your mac saying your device is in recovery mode)
Restore your phone : you will be back to iOS 16.5
When first configuring it DO NOTrestore from your last iCloud backup, you will end up with the same stuck lockscreen
Setup as new iPhone, and link your iCloud account (you will have the developper certificate installed)
When the config is done and you can go to the dashboard, go to settings --> update (select iOS 17 beta profile) and update to iOS 17
When iOS 17 is installed and you are back to the dashboard, go to settings --> general --> erase all
You will then have a new install of IOS 17 and only now you can choose restore from your last iCloud backup
Hope it helps !