Thermalization of a magnetic impurity in the isotropic X--Y model