This has been happening with my iPhone 16 Pro Max for about a month now, once or twice every week or so. I have called Apple support and they tested the phone to no avail and no answers. I was told I could get a Express Replacement since my iPhone was still under warranty, but I would have to still pay for said replacement at a reduced rate. Uh, no!
From all the people here with the same issue, this is another big problem that Apple is ignoring. How many people with this same issue does it take for Apple to address this, if at all?! It's been suggested that we leave the phone powered up overnight while charging. That might fix the issue by putting a band aid on it and it would probably work, but you should be able to turn off your phone/computer when you need to without the nagging doubt that it won't power up again the next morning after charging and having to do a Forced Restart and pray that it will work!
And how many times will this issue pop up and be cured with a Force Restart, will work, before the phone completely bricks, especially when said phone's warranty has expired and now you have a very expensive paperweight?
Ah, for myself, the solution is to nurse this iPhone until the iPhone 17 Line drops this coming September and take another chance on a new device once again. Apple is really no help and the Limited Warranty is really Limited. I would suggest that even the extended warranty plan is full of holes and really not worth the expense it costs too, once you read all the fine print.
I am really old it seems and today even moving to another platform does not guarantee you will be problem free any more. Quality Control and Reliability are things of the past now. Ugh!