From my knowledge, being in a calorie deficit causes more muscle breakdown because your body requires protein which it gets from the muscle. However, being in a calorie surplus regardless of how much protein is in the diet causes less muscle breakdown. How?? If both the deficit diet and surplus diet have the same amount of protein, how can a surplus prevent muscle breakdown?
Net anabolism and net catabolism are the concepts you need to help you understand this. Muscle protein synthesis will be higher during a net anabolic state (building up more than breaking down, a caloric surplus) than during a net catabolic state (breaking down more than building up, a caloric deficit). Muscle protein breakdown isn’t as sensitive to change based on anabolism/catabolism, so assume that it is more or less consistent.
So when you are in a deficit, it’s possible for muscle protein synthesis rates to drop below muscle protein breakdown rates which results in a loss of muscle mass. Synthesis and breakdown are constantly happening regardless of energy intake, but the rates at which they occur can be altered - slightly in the case of breakdown, but notably in the case of synthesis.