AbstractIn vesicle membranes, the minimum of the elastic bending energy determines the equilibrium shape. We can reformulate the energy using a phase‐field function and optimize it using the standard gradient flow approach. The method, in its typical formulation, allows topological changes in the membrane; however, in certain events, like in the simulation of blood cells, maintaining the initial topology of the membrane is crucial. In this study, we add a constraint on the phase‐field method to preserve the topology. We note that even if the phase‐field method is formulated using a hyperbolic tangent function, during a change in topology, the membrane's profile deviates from the tanh function. Owing to this idea, the constraint imposes an additional requirement on the profile to maintain the tanh shape, thus preserving the topology. We perform extensive experiments in two‐dimensional and three‐dimensional scenarios to demonstrate that our method preserves the topology during the simulation.