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.
I started losing weight from severe obesity with a caloric deficit but noticed I was also feeling weaker in general (aside from the tiredness that comes with eating under your TDEE).
I started going to a trainer and he had me change my macros so that I was consuming about 200g of protein per day in addition to 4 days per week of full body workouts on top of my cardio.
Since then I’ve lost an additional 150% of my initial weight loss, and have gained moderate muscle mass on top of that.
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)