At high frequencies the compensation capacitor acts as a short for AC signals only i.e it is a short only for those high frequency signals.
Let us assume that the gate of M5 is at Vgs,M5 DC potential.
and that the drain of M5 is at Vds,M5 DC potential.
Now when we add a high frequency voltage at the gate, Vgs,M5 + a0sin(ωt).
Now the capacitor is only a short for this high frequency signal and hence, at the drain we would see, Vds,M5 + a0sin(ωt).
The DC voltages would remain the same.
Similarly the impedance seeing from the drain of M5 the impedance at high frequencies would by 1/gm5