When I was working out at Crunch (long after I got kicked out of that other gym) I would go across the street and get two tacos at Taco Bell which is good from the perspective of athletic performance because it puts back the glycogen you use and you'll use the protein to make muscle. But from an energy perspective it's close to neutral.
Muscle is good for you anyway in many ways, not least metabolic and in terms of mental health. I had an elite athlete workload back in the time I was trying to start a business based on foundation models about a decade early and it helped me keep it together though now I have
https://my.clevelandclinic.org/health/diseases/23920-athlete...
and my cardiologist told me to exercise less! I am still obese in terms of either BMI or fat percentage but I just saw a specialist for "medical weight loss" (e.g. Zepbound) I was told I had a huge lean body mass and that would help me lose weight. Wearing normal clothes I don't really look fat but in the wrong gym clothes next to the fit 20% of college students I have one hell of a gut.
However, not all calories are the same, metabolism is dynamic, and the brain is complex and exerts a powerful influence over behavior.
Increasing exercise will make you hungrier and most people are simply unable to resist this and end up not losing weight. It is why there is a common saying that "you cannot outrun your fork." Restricting calories generally is difficult in today's environment with plentiful calorie dense food everywhere. People don't cook as much as they used to and restaurant meals have more calories than ever.
AFAIK GLP-1 drugs work because they calm the minds desire to eat which is baked in deeply from millions of years of our ancestors struggling to get sufficient food.