How does the photovoltaic inverter synchronize with the grid?
A grid tied inverter is a current source,  precise synchronisation isn't needed to avoid catastrophe because the current is limited.
The inverter watches the voltage and pumps the current in the appropriate direction.
If it sees the voltage or frequency going out of range it deduces that it has been disconnected from the grid and stops feeding it.