An invariance of geometric mean with respect to generalized quasi-arithmetic means