Phase-only light modulation is an important functionality for many optoelectronic applications. Although modulation efficiency can be significantly improved by using optical resonances, resonance detuning is always accompanied with dramatic intensity variation that is less ideal. Here, we propose a method to achieve intensity-flattened phase shifting by utilizing the unidirectional guided resonance (UGR) – a novel class of topologically enabled guided resonance that only radiates toward a single side. Consequently, the incident excites resonances and generates phase shifting, but it transmits to only one out-going port without other choice, which flattens the transmittance. Theory and simulation agree well and confirm our findings, in particular when nonradiative loss has been taken into account. By directly measuring the intensity and phase responses of UGR samples, a dip depth of 0.43 is observed with nonradiative Q around 2500. We further predict a dip depth of 0.13 can be achieved with a reasonable nonradiative Q around 8000 in state-of-art fabrication precision, which is sufficient and useful for the applications ranging from light projection, flat metalens optics, optical phased array, to light detection and ranging.