Most guys will regain normal HPTA function after ceasing TRT, but the longer you're on TRT the harder it can be to return to baseline. There have been many cases where men were on TRT and return to baseline even after several years or cease TRT to restore fertility and then hop back on TRT.
I was on TRT for two and a half years, stopped TRT and return to baseline quickly (4.5 weeks) without any medical assistance. Then eight months later got back on TRT.