MOSFET differential pair with feedback
Of course, the gain at the drain node of M1 will NOT be (totally) independent on the value of R2.
HOWEVER, the influence of R2 will nearly be neglectable. This can be verified as follows:

The transistor M1 is operated in common source configuration with signal feedback caused by the (rather low) input resistance r_in2 at the source of M2.
This input resistance is (nearly) independent on the resistor R2 and we are allowed to set r_in2=1/gm2.

Of course, such a simplification causes a small error which, however, will be smaller than other uncertainties: Resistor tolerances, non-ideal current source, differences between gm1 and gm2, neglection of transistor output impedances,...)