What you write is true but has absolutely nothing to do with being able to inject current into the grid by an inverter.
Very fundamentally, inverter does not need to know the frequency or "sync" to it (except for protection features mandated by law). It's all doable by exact same circuit as charging a DC battery: an adjustable voltage source (for example, a PWM-controlled MOSFET stage) and current sensor.
If you want to charge a 12V battery, with 100mOhm ESR, at 1A from a 24V source, you do it by applying 12.1V to the terminals, which you can do by applying 50.4% duty cycle on a buck converter stage. But instead of guessing you need exactly 12.1V to drive current into the battery, you would have a current sensor and a feedback loop. Let's say you have a simple buck topology with two MOSFET switches. When the current is below the 1A setpoint, duty cycle increases. Current starts to increase as a result. If the current is going over 1A, duty cycle is lowered. Steady state might be achieved at 51% duty cycle, going from 24V source to 12V battery, with losses. Feedback loop takes care of delivering 1A when the conditions change.
Why the DC battery example? Because there is absolutely nothing different in mains, it's a very low-resistance, low-impedance voltage source just like the battery. 50Hz is basically DC. If you want to consume or inject power to mains, just measure voltage and current. That instantaneous power is what matters. Power also has a sign. Change the sign of the current, and the direction changes, exactly like with DC.
For example:
U=+300V, I=+1A, P= +300W
10 ms later:
U=-300V, I=-1A, P=+300W
Opposite direction:
U=+300V, I=-1A, P=-300W
10ms later
U=-300V, I=+1A, P=-300W
Just measure every 1ms or preferably even more often, and you have bidirectional power measurement. Change the current setpoint I = k * instantaneous measured U, and you have controlled average power, in either direction (just swap the sign of k), with unity PF. Because of the bandwidth available with modern-day parts, it is not a problem at all for the control loop to track the current setpoint varying sinusoidally at 50Hz.
Mains frequency or complex impedance is not really part of the equation - because 50Hz is basically DC, compared to our switching frequencies and measurement/control BW.
Now designing an actual inverter would be way more complex with all nasty little details, but this is the basis to build on.