It keeps the muscle
The weight you lose should be fat. Resistance training has been shown to limit lean-mass loss during a calorie deficit, and the researchers who reviewed the GLP-1 trials recommend it alongside the medication for exactly that reason.
Sources 1 to 3