From what I’ve read on the issue, low intensity exercise will help maintain muscle mass during extended water fasts. By low intensity, I mean 60% of the weight you’ll do at the gym (ball park figure), or light jog/brisk walk.
For OMAD, anecdotally you can gain muscle, so long as you’re close to maintenance calories and have enough protein.
Study of Buchinger fasting participants showed the “exercise group” and “non-exercise” group lost about 1kg of “protein” over the course of a 28-day fast. Doubtful that the protein loss was muscle though, because the “exercise group” gained strength throughout the fast.