Does cardio burn muscle?
Not on its face. A calorie deficit will either slow down muscle growth or even reduce muscle depending on intensity and duration regardless of how it is achieved. Eating back all the calories you burn from cardio would then not have a negative impact on muscle building at all with one exception that I'm going to bring up later in this answer.
Protein and calories needs to be allocated for either muscle protein synthesis or moving. Moving is way more important for survival so your body is going to default to that. If you're in a calorie deficit, then more of that will be allocated to keeping you moving. If you're at maintenance or higher, then more can be allocated to muscle protein synthesis.
There are two ways cardio could negatively impact muscle building in the short-term:
- Increasing the calorie deficit even further. Starting at 300 calorie deficit, if you added 300 calories burned from cardio, it would have the equivalent effect of reducing your calorie intake by 300. This is speaking strictly in the context of fat reduction / muscle building. Protein and calories goes towards moving your body rather than muscle protein synthesis so it becomes increasingly difficult to build more muscle.
- Impacting recovery. If your cardio of choice is really hard, heart pounding then this can have a negative impact on your ability to recover. This then would negatively impact your ability to push the resistance training which is important for maintaining muscle mass. So it's usually better to choose long steady-state cardio over fast HIIT cardio. This is usually why it's advised to do cardio after the weight training session on the same day.
There are positive benefits of cardio for muscle building as well. It increases heart health. It increases endurance. These are long-term benefits that over time help translate to lifting weights better. So I don't want to discourage anybody from doing cardio because in the long-term it's very beneficial.
Personally, I also think there are benefits to increasing cardio over lower calories because more food also means more micronutrients which is always a good thing. The downsides are time, effort, and it's nearly impossible to track calories burned*. People typically find eating less to be the path of least resistance. Particularly if it's something you have to do for many weeks or months.
To summarize, as far at fat/muscle loss is concerned, it doesn't make much of a difference where the deficit comes from. The main difference comes down to what you can find is easier to adhere to.
* Watches and machines are not accurate assessments of calories burned.