I can't remember when this behavior started.
I used to power off (or sometimes my phone would shutdown with no battery) and then plug in to charge. I like to charge my phone when it is off.
Now it restarts itself and boots. No matter what. Even when USB-c is port set to OFF (instead of charging-only or whatever), the phone restarts itself, shutdown because it has no battery, restarts... and eventually it won't boot anymore and charge while off.