Nothing with guarantee you keep all the gains, especially in the case of an existing wasting disease.
In the case of a wasting disease, doses above testosterone replacement therapy (TRT) are merited as the benefits of androgen therapy outweigh the negatives.
However, you are really best, in that case, to use a dose such as 250mg/week but not cycle it.
Just my opinion, but I think this is the way swale (a physician) _probably_ treats his wasting disease patients. But you'd have to see him to be sure, I suppose.