I came here to find a solution because I am experiencing the same issue.
this is my very first iphone (iphone 12 mini) ever that is 3 weeks old now.
@QuickTimeKirk or other advisors who advice to charge overnight: please, be quiet and leave this conversation. you are not helping at all and only provoking aggressive behaviour.
charging the phone overnight makes no sense because the issue is not directly night related and can accure over a usual working day. so, would be the advice of level 10s to have the phone plugged in all the time?
I don't have a charging brick (I am lucky enough that I have USB-C on my computer; I refuse to buy one, I am happy with the apple product but not with the apple marketing strategies) so I am forced to charge the phone on my computer that is not running at night.
the issue accured twice now with about a week inbetween which is the rason why I now am looking for a solution.
is replacing the iphone realy the only solution?