After having a faulty phone for a week I finally solved the problem.
Initially I thought it could be software related, so I tried a lot of suggestions posted here. But none worked.
Although the device is still under warranty, I didn't want to let it in the repair shop.
What worked for me was, after turning the phone off, spraying the USB-C port with an electronic contact cleaner (I had one which doesn't leave any kind of residue and evaporates rapidly - like this one: https://www.pcbtoolexpert.com/best-electronic-contact-cleaner/). I sprayed. A lot. It even dripped a bit from the port.
After the procedure, I waited a minute or so before turning the device on ... And it worked like a charm, it now turns off, there's no notifications ... it's like new.
So, now I suspect the problem might be cheap components (non-oxidation proof) and moisture, and that I will have to eventually repeat the procedure when the problem returns.
The nose reliable solution I have done is literally just use the phone until its dead. Let it die. I know it's painful to watch, and because of the glitch it Looks awful when the phone is at lower than 10 percent. But do it.
Then keep it off. Let it stay shutdown and charge it back to around 80 percent. This worked for me, then it came back so I did it again, and it hasn't come back since. I hope this works for you too!
I know..brand new phones and a glitch in the software..suddenly mine stopped doing it just a few days ago..its weird..maybe they updated software.idk.i didnt do anything new to it
I have same problem before then i send it back to samsung repair,they replace pba and bga failure code 312 and 73. Then it back to normal but after 4 months same problem again.
Mine also having the same problem. I really dont know what to do. Im from east africa and we dont have any sumsung specialists here.
The only difference is the phone seems to be working normally when it is plugged in and charging. Then the problem occurs again when its disconnected from the cable. The worest experiance ever.
Try one of this solutions:
The first one worked for me (1 day has passed). I hope the problem does not appear again.
Correction, the solution was to drain the battery until the phone turns off, then charge it and after a while turn it on (while it is connected).