with a.m cardio you will lose a little muscle on ketosis or any other diet. its quite catabolic on the system after a 6-8 hour fast. and even if you wake up in the middle of the night to consume your x amount of protein, you will still be in a slight catabolic phase in the a.m.
the only way to spare muscle on a strict a.m cardio routine is with the use of anabolics. and even then you will still lose a little bit.