I had a similar problem. Solved by setting my routine to first unlock the phone before switching the charger off. I had to include a place=home trigger but others like wifi will work.
It's in the lock screen section. Called "Keep your phone unlocked". Turns out that this isn't as reliable as I thought. I occasionally wake to the phone at 100% but at least not all the time.
I have been having the same issue on a S21 Ultra using Android 12, it is such a pain.