There are very complex dietary regimes that can be followed to minimize this, but most studies have shown that they don't save any time compared to losing weight and then working to get the muscle back afterwards.
> Dyck’s study comes on the heels of a commentary published in the November issue of The Lancet by an international team of researchers from the U of A, McMaster and Louisiana State University who examined emerging research showing that up to 40 per cent of the weight lost by people using weight-loss drugs is actually muscle.
This is, again 100% typical of what happens with caloric restriction.
Professional body builders do bulk/cut/bulk/cut because after awhile you can't lose weight and put on muscle at the same time, especially if you want to get to the point of being shredded.
(well you can do it, but there is no benefit over bulking and cutting)