This is a common misconception.
With TRT, of course it is ideal to exercise regularly in order to take advantage of the energy boosting, muscle building and fat burning effects that testosterone will provide. If you stop working out, however, this does not mean you should stop TRT. Quite the opposite- stopping exercise and stopping testosterone will lead to a more rapid decline of your muscle mass.
In addition to not training and growing your muscles, your body will also not have the supporting hormones it needs to maintain them. Continuing TRT while taking a break from exercise will help maintain muscle mass, rather than leading to a more rapid deterioration.
A helpful analogy to consider would be a person with diabetes who needs insulin and is following a low-carb diet. If he or she decides to stop eating low-carb, they certainly wouldn’t stop their insulin medication. In fact, they would need their insulin even more urgently! Although diabetics are usually dependent on insulin, testosterone therapy is still very important to maintain proper bodily functions and to prevent symptoms of low testosterone. Ultimately, it is best to exercise when on TRT, but this is not required, and testosterone will be even more critical in maintaining your current muscle mass. If anything, continuing TRT while not exercising can serve as an insurance policy to preserve muscle gains until you’re ready to start training again.