I worked out everyday during my 19 day fast.
https://www.evolutionary.org/my-19-day-water-fast-story/
24 hour fasting is hardly extended by the way,that is still a very short fast. you don't lose muscle when you fast, you lose water in the muscles only. what happens during your fast is HGH spikes at the 14 hour mark. so you will actually burn fat while still keeping muscle. I have a client who got his dexa numbers after doing numerous types of fasting over the course of 3 months. his body fat dropped 5.5% and his muscle mass actually rose .8%!!
besides the HGH rising during your fast the other mechanism that happens is your metabolic rate DOES NOT DROP. when you eat in a caloric deficit meanwhile, your metabolic rate DOES DROP. that is why calorie deficits are moronic and do not work in the long run, but fasting works amazingly well
you can read more about fasting in my Ebook in my signature or listening to our podcasts. you can also google Nobel Prize and fasting and see the winners of the Prize 2 of the last 3 years proved how fasting actually kills cancer cells and boosts autophagy and immune system. there are tons of benefits. everyone should be fasting. in fact the 5 blue zones in the world (those are the places in the world with the healthiest and longest living people) they all do some sort of fasting. the least healthy places in the world (sorry deep south USA you made the list) they do no fasting at all.
now I just want to be clear if your goals are repair and healing you do not want to workout during a fast, you want to rest during your fast so your body can repair itself. so you can use fasting in different ways.
but if your goals are purely fat loss. then do your cardio, then fast away as long as possible.. once you hit 30 hours that is when ketosis starts rising a lot and your body starts destroying fat cells. just make sure you are hydrating thoroughly because you will lose electrolytes rapidly. and then during that fast keep working out as normal.