This article proposes a 10kW string inverter based on GaN field-effect transistors (FETs). We will also explore the benefits of GaN and highlight the advantages of building such a system for residential solar applications.
[pdf] 
in short, the answer is Yes, you can charge a battery while using an inverter. but make sure that the load should be lower than what solar panels are producing according to weather conditions. connecting an inverter with the battery will not do the harm to your battery while it's charging unless the battery is. .
in short, yes it is safe to charge your battery while the inverter is connected. but the only thing to keep in mind is that the load connected with the inverter should be even to the input of DC power to the battery from the solar panels As long as you're not consuming. .
Yes, you can charge a battery while running load or connected to the inverter but make sure that the load wattage should be less than. .
if you need instant power then this method is recommended but there are a few things to keep in mind before doing this if you have a large solar array then you should and definitely can do. .
Connecting a load with a battery while it getting charged from solar panels will provide you the instant power and this will be beneficial if you have large solar panels with a small size battery
[pdf] It typically takes about 1 to 4 hours to fully charge a lithium-ion battery, depending on the device and charger used. Most smartphones fully charge in approximately 1.5 to 2.5 hours with a standard charger. In contrast, larger devices like laptops can take about 2 to 4 hours for a complete charge.
[pdf]