I don't have it at hand [edit: [0]] but there are a number of studies showing exercice had more health impact than weight loss (you can combine both of course, but just losing weight has less benefits)
As you point out, losing muscle is common in a diet, and the researchers are well aware of it. Their point was that this aspect is not pushed enough and is drowned by the losing weight part.
From the paper:
> Dismissing the importance of muscle loss can create a disconnect between patients' increased awareness of muscle and the role it plays in health, and clinicians who downplay these concerns, affecting adherence to and the development of optimised treatment plans.
[0] https://journals.lww.com/acsm-csmr/Fulltext/2019/08000/Effec...
For the "Fitness Versus Fatness" part for instance