The only circumstances where you will burn a significant portion of muscle before fat is if you are eating a high fat diet with less than 30 grams of carbohydrates or protein per day.
If you are fasting or in nutritional ketosis, your brain still needs about 120 grams of glucose (or as low as 20 grams after it adapts to producing and using ketones for fuel). If you aren't getting the glucose it needs or ingesting carbohydrates that can be broken down into glucose, your body will begin gluconeogenesis, a process that turns amino acids (from the breakdown of protein) into glucose. If you are still consuming dietary protein, it will break this down first, but if you are not, it will get these amino acids from your muscles and other "lean" tissues.
Basically, if you are consuming an adequate amount of protein, it's pretty hard to lose muscle mass without losing a significant amount of fat.