Try toggling it on and then off (if you already have developer options turned on.) The only other thing I can think of is that the charger or cable is bad and the phone is actually rapidly switching between charging to not charging to charging, etc.; when you put the phone on the charger, it powers on, so perhaps it's constantly getting the signal that you are powering on before it times out?
So, maybe try a different car charger and/or cable?