Luisa's regency continued even after Afonso came of age because he was considered mentally unfit for governing. In addition to lacking intellect, the king exhibited wild and disruptive behavior.
The text describes a situation where Luisa held power even after Afonso reached adulthood because he was deemed mentally unfit to rule and exhibited disruptive behavior.