I had the same issue, but no more.
here are the steps I took:
- I slapped the charger onto another iPhone, still on IOS 17, just to be sure it wasn’t a charger issue.
- I turned off the impacted phone, then transferred the charger to the back of it, while still active (indicator still on).
- The phone turned on automatically and the charger stopped shutting off.
- I removed it and tested in 3 more times, it doesn’t trip off anymore.
All you night need to do is just turn off the phone and wake it with the charger.
I hope that solves your problem too .