Mitigation of deleterious heat flux from edge-localized modes (ELMs) on fusion reactors is often attempted with 3D perturbations of the confining magnetic fields. However, the established technique of resonant magnetic perturbations (RMPs) also degrades plasma performance, complicating implementation on future fusion reactors. In this paper, we introduce an adaptive real-time control scheme as a viable approach to simultaneously achieve both ELM-free states and recovered high-confinement (βN~1.91$ and HN~0.9), demonstrating successful handling of a volatile complex system through adaptive measures. We show that, by exploiting a salient hysteresis process to adaptively minimize the RMP strength, stable ELM suppression can be achieved while actively encouraging confinement recovery. This is made possible by a self-organized transport response in the plasma edge which reinforces the confinement improvement through a widening of the ion pedestal and promotes control stability, in contrast to the deteriorating effect on performance observed in standard RMP experiments. These results establish the real-time approach as an up-and-coming solution towards an optimized ELM-free state, which is an important step for the operation of ITER and reactor-grade tokamak plasmas. Notably, the real-time adaptive control scheme introduced here provides a path towards economic fusion reactors by maximizing the fusion gain while minimizing damage to machine components.