Yes, that indeed is my question.
An inverter producing real power only, will produce a voltage waveform that matches the grid waveform, except for some epsilon of an increase in amplitude to account for voltage loss through the line impedance to the point of interconnection. An epsilon of voltage difference that directly determines the current. The inverters use a feedback loop to determine what the grid impedance is, in order to produce the voltage necessary for the desired power output.
To produce reactive power, it will need to produce a waveform that differs not only in amplitude, but also a difference in phase. The vector difference in the voltage waveforms between the inverter's voltage and the grid voltage, will produce current that is out of sync with the grid voltage.
For instance, consider a perfect 120V grid voltage at a phase angle of zero by definition, and the line impedance to the point of interconnection is 0.4 Ohms of resistance and negligible reactance. We'd like our inverter to provide 1.2 kW of real power and 0.9 kVAr to support an inductive load. We ask the question, what amplitude and phase angle, must the inverter produce?
With V & I as vectors, we set up the following equation:
V_inv = V_grid + I*R
V_grid = <120V, 0>
V_inv = <Vx, Vy>
I = <Ix, Iy>
Based on given kW & kVAr values:
Ix = +10 Amps
Iy = +7.5 Amps
If it supports a capacitive load, Iy would be negative.
This allows us to calculate Vx & Vy:
Vx = V_grid + Ix*R
Vy = Iy*R
Vx = 124V
Vy = 3V
Find the corresponding magnitude:
|V_inv| = sqrt(Vx^2 + Vy^2)
|V_inv| = 124.0363 Volts
And the phase angle:
angle(V_inv) = arctan(Vy/Vx)
angle(V_inv) = 1.386 degrees
The inverter voltage would lead the grid voltage in phase, in order to support an inductive load where current lags voltage inside the load. Opposite for a capacitive load.