I started drinking a protein shake once a day and the random mysterious injuries stopped.
[0] https://www.barbellmedicine.com/blog/where-should-my-priorit...
See this article: https://www.healthline.com/nutrition/high-protein-diet-plan#...
> The Recommended Dietary Allowance (RDA) of protein is 0.8 g per kilogram of body weight (g/kg/bw), or 0.36 g per pound of body weight (g/lbs/bw).
> However, the authors of a 2019 review suggest that this number is often misinterpreted as the ideal number. It’s only the minimum amount of protein required to prevent nutrient deficiencies and muscle loss in most healthy individuals.
> A 2017 study found that participants who ate a high protein diet of 1.34 g/kg/bw (0.6 g/lbs/bw) for more than 75% of the 6-month duration experienced significantly more weight loss than the group who followed the RDA requirements.
> A 2016 review found that eating up to 2 g/kg/bw (0.9 g/lbs/bw) may help promote strength and prevent muscle degeneration.
etc.
You’re 100% right though, the key to retaining muscle mass while in a caloric deficit is consuming sufficient protein, or even over-consuming protein. In starvation situations muscle is next up after fat when getting consumed for energy but it seems like for the most part the muscle mass deterioration during significant weight loss periods is a natural side effect of the process and lifestyle required to accomplish it.
Secondary to that, the body needs some amount of glucose. The best option for that is stored glycogen. When those stores run out the body can enter ketosis which reduces but does not eliminate the need for glucose. Fat consists of three fatty acids joined by a glycerol part. Most of the energy is in the fatty acids, but the glycerol can serve as a limited supply of glucose. However that is not really sufficient, so to get more glucose, and the other option is breaking down protein.