In this paper we study how to avoid escapes in open dynamical systems in the presence of dissipation and forcing, as it occurs in realistic physical situations. We use as a prototype model the Helmholtz oscillator, which is the simplest nonlinear oscillator with escapes. For some parameter values, this oscillator presents a critical value of the forcing for which all particles escape from its single well. By using the phase control technique, weakly changing the shape of the potential via a periodic perturbation of suitable phase varphi , we avoid the escapes in different regions of the phase space. We provide numerical evidence, heuristic arguments, and an experimental implementation in an electronic circuit of this phenomenon. Finally, we expect that this method might be useful for avoiding escapes in more complicated physical situations.