It is called desistance.
Unfortunately, among the experts there is no consensus on the exact definition of desistance but in the field of criminology it is used to denote the termination and the cessation of the antisocial behavior. This is very active topic of research but it still unfortunately not very developed and not much is still known of this phenomenon. A key thing that help desistance is the focus on positive development of human beings and the better knowledge of this would help with the development of the justice system.