The warning isn't that you're losing muscle during weight-loss with these drugs. It's that the ratio of muscle vs fat loss is much greater with the drugs compared to traditional weight loss methods.
It's been well studied that if you exercise and eat enough protein while losing weight, you can retain more muscle.
Losing a lot of lean mass is incredibly detrimental to your longevity and quality of life.