The modern weight-loss programs I'm seeing now (at least those aimed mostly at middle-aged men) emphasize consuming significant amounts of protein (2g for every 1kg of body weight each day) and engaging in regular resistance training, in order to maintain muscle mass.
The article addresses this:
To keep muscle strong while losing weight, Prado says it is essential to focus on two main things: nutrition and exercise. Proper nutrition means getting enough high-quality protein, essential vitamins and minerals, and other “muscle-building” nutrients. Sometimes, this can include protein supplements to make sure the body has what it needs.
Perhaps there needs to be more formal research into this, and a strong recommendation made to everyone using these drugs that this kind of diet and exercise plan is vital.