Evolution of the beam quality factor for various active medium positions within a Gaussian cavity