Here's a good starter article to read.
https://www.bodybuilding.com/content/in-depth-look-at-ketogenic-diets-and-ketosis.html
In my personal experience I had my body fat percentage checked on a dexascan before I started, and at the one year mark of ketosis. I was very heavy at the start at 320 pounds and 35% body fat. At my one year mark I weighed 228 and was at 11% body fat. So out of 92 pounds lost about 15 pounds were lean body mass.
That may sound like a lot, but losing that much weight by cutting calories, which by definition is really just putting your body into a state of malnutrition, would have been much worse. Cutting calories also can have devastating effects on your metabolic rate that can take years to recover from.
I have been on ketosis for another year and I will not be doing another dexascan until next month, but I am leaner since my last measurement and have gained 7 pounds. My guess is that all or more of those 7 pounds are all lean body mass.
I never really felt a loss of energy. Using the bench press as a way of monitoring my strength I did lose some strength but have since regained it and then some. at the start I could bench 225 for 14 reps. At my one year mark of ketosis this had dropped to 11. Monday of this week I did 17 reps at 225. I have cut down my cardio from 6 days a week to three.
Not everyone I know who has done keto has the same kind of results that I have. I have been really strict and have done a lot of research. Many who don't do well on it haven't done their homework and go about it incorrectly. My biggest suggestion to you if you are worried about losing muscle is that you don't try to restrict calories. The whole idea to keto is training your body to burn fat instead of glycogen. I kept my calorie intake between 2500 and 3000 daily and let exercise take care of the fat.