We demonstrate an approach for stabilizing the transverse mode structure in cases where there is strong coupling between the longitudinal and the transverse modes. In this approach, an intra-cavity phase element that discriminates and selects a specific transverse mode is inserted into the laser resonator. We show that the discrimination can be so strong that the selection of the single transverse mode remains stable despite changes of the resonator length. We calculated the ratio of the small-signal gain and the gain threshold value for the fundamental and (1,0) Hermite-Gaussian modes, as function of a tiny change Δz of the resonator length, with and without the phase element. Without the phase element, the tiny change of the axial coordinate z of one of the mirrors of CO2 laser leads to periodical change of different transverse modes. Introducing intra-cavity phase element preserves a single transverse mode, which is kept practically unchanged with the change of the axial coordinate z, except for a slight periodical change of the output power and the beam quality, due to the periodicity of the resonance conditions.