Happened whilst charging, was on 39% when I connected it to the charger, fell asleep for a couple of hours woke up to the Apple logo and it restarting, it was fully charged upon booting back up.

Wonder what’s causing this? I’m also on iOS 17.1 Beta 3 so isn’t just an issue relating to just iOS 17.0, 17.0.1, 17.0.2 and 17.0.3 etc as some has suggested.