Based on what I read, a lot of why Wegovy and its varients work are because (1) it makes you feel full, and (2) it makes some foods taste like shit. So you're losing weight because you aren't eating as much. Once you're off the drugs, unless you have discipline to maintain the lower caloric intake, you'll put on weight again. I love my steak, and the very thought of taking something that would make me not like it, is appaling.
One thing is that lean muscle helps to burn calories, which helps to keep weight down. As you increase your muscle mass, the calories you burn per second increases. Science says that people need 1-1.6 grams of protein per kilogram (2.205lbs) of bodyweight to maintain or build muscle. If you aren't eating enough protein, you're not supporting your muscular system, as you grow older, this is going to affect your metabolism. Also, remember that not 100% of the weight of meat is protein - a pound of raw ribeye steak contains about 85g protein.
Another thing is that starches and sugars on the other hand tell your body to convert whatever unspent calories you have into fat. Too much of this before your body has had a chance to burn off the calories consumed will cause weight gain. This is at least partially why diets like Adkins and Keto work.