Here is an introductory paper on that exact topic:
"If light waves are stretched by gravitational waves, how can we use light as a ruler to detect gravitational waves?" https://universe.sonoma.edu/moodle/pluginfile.php/89/mod_res...
The way I explain it: The light already inside the arm cavity is stretched. But newly entering light is not. We are basically using the light as clock to measure the length of the arm. When the arm is in the "stretched" state, light will take longer to make a roundtrip in the arm. It will accumulate slightly more phase, which is measured interferometrically.
It is important that the storage time of the light in the arm is short compared to the period of the gravitational wave.