That's the danger of any rapid weight loss where you don't exercise and ingest additional protein.
I knew about it from prior research, but my doctor made sure to mention it to me as well. He's also monitoring the speed of my weight loss to determine if I should go on ursodiol to prevent gallstones - another potential side effect of rapid weight loss.
But the same could happen on any sort of caloric deficit. The GLP1 drug isn't causing you to lose muscle through some reaction occurring inside your body - it's your body just doing what it does in a calorie deficit when you aren't overindexing on protein and working out.