There seems to be some difference of opinion on whether a modified sine wave is sufficient or only a true sine wave is acceptable...just to be safe, I would power down while charging....
"You can use car power inverters to charge or power most household electronics; however, there are some limitations. For example, the car power inverters do not supply enough power to charge a laptop battery from empty while it is in use. You can either use the laptop, or turn it off and charge it. You won't be able to do both simultaneously. It is important to research the electrical requirements of the electronics you want to power before purchasing.
The auto power inverters we reviewed utilize a modified sine wave in power output. This type of device is much more affordable than a true sine wave unit, but the modified sine wave device is slightly more susceptible to power interruption. For the average user, even if you are watching movies, this interruption will be nearly unnoticeable. However, some devices, such as power tools and specialty laptops, do not work with a modified sine wave. Be sure to check the user manual of your electronics before purchasing a power inverter.
In order to protect against overheating and other circuit overloads, the power inverters have a variety of different safety features. If the temperature exceeds normal and safe operating boundaries, the inverter will shut down. This can protect the components and prolong the life of the inverter. If there is a power surge and the inverter draws too much power, it will automatically shut down. This can protect against a circuit overload. Also, if you're using the inverter with the vehicle's engine turned off, the inverter will shut down before draining the battery. In order to avoid this problem, start the engine at least once an hour and let it idle for at least 10 minutes."
Commonly a mobile phone charger would be SMPS based. In case of an inverter a sinewave has more Peak-to-Peak voltage while a modified square wave has less Peak-to-Peak voltage for same RMS output voltage.
Mobile phone chargers which are under 8 watts, normally do not have a active PFC (Power Factor Control) stage. Thus they can well work with the modified sine wave with lesser voltage stress on the input rectifier-capacitor block.
Switching off the mobile phone cuts-off demand on the battery charger but the charging circuitry and the SOC is still running, just not doing as much. It wakes on an alarm or appointment right!!
So if the charger fails and starts giving out high voltage and it not well designed (lacks device protection for such failure) then it is still going to fry the charger controller and associated power circuitry.
So the bottom line is use the original branded charger for your smartphone and it should not kill the phone if anything goes wrong, even if it may get damaged itself. Cheap Chinese chargers economize the cost by removing important protection blocks.