Fasting increases growth hormone release (dramatically, in the case of extended fasting), which counters muscle loss. Does this happen with GLP-1?
When you are losing 5% of your bodyweight per month (as I was, and many do) a substantial portion of that is simply going to be mean muscle mass. You can counteract some, but not all, of this by heavy resistance training. It's very difficult to not lose muscle mass while losing weight - it takes extreme measures for most folks (e.g. athletes) to do so.