Fasting (unlike calorie restriction) does not oxidize muscle for energy. I have been fasting 20:4 for the past 50 days and have not lost any muscle. You can lift during your fast if you want to have some gains while your fasting the elevated human growth hormone in your body will help with this
Make sure to activate your muscles often during your fast. It isn’t so much the fasting that would result in muscle loss, rather, it is the lazy ‘take it easy and don’t spend much energy’ inducing effects of fasting that cause it.