Accurate knowledge and control of the phase center in antenna arrays is essential for high-precision applications such as Global Navigation Satellite Systems (GNSS), where even small displacements can introduce significant localization errors. Traditional beamforming techniques applied to array antennas often neglect the variation of the phase center, resulting in unwanted spatial shifts, and in consequence, localization errors. In this work, we propose a novel beamforming algorithm, called Phase-Center-Constrained Beamforming (PCCB), which explicitly minimizes the displacement of the phase center (Phase Center Offset, PCO) while preserving a chosen directional gain. We formulate the problem as a constrained optimization problem and incorporate regularization terms that enforce energy compactness and beampattern fidelity. The resulting PCCB approach allows for directional gain control and interference nulling while significantly reducing PCO displacement. Experimental validation using a simulated GNSS antenna array demonstrates that our PCCB approach achieves a fivefold reduction in PCO shift compared to the PCO shifts obtained when using conventional beamforming. A stability analysis across multiple random initializations confirms the robustness of our method and highlights the benefit of repeated optimization. These results indicate that our PCCB approach can serve as a practical and effective solution for decreasing phase center variability.