When my dad was diagnosed with cancer he was 210lbs at 5’10" (yes, he was overweight at the time). During the course of surgeries and treatments and being unable to eat, he lost weight like he was pissing water.
By the time the cancer fully took him (and he had no longer been able to eat), he passed away weighing approximately 120lbs. He was nothing more than skin and bone.
So yes, if you don’t eat, you will lose fat and muscle.