Everything I’ve heard is that working out let’s you retain muscles if you’re cutting. I know far less about muscle growth than I do about losing weight. But from what I know, you need a caloric deficit to lose weight and you need a caloric surplus to gain weight (including muscle). Those contradict one another. Of course the reality is likely more complicated - you may get definition or something. You will likely grow strength as that more neurological than muscular (see gymnasts). If I were you, I’d try to cut the weight first and then hold steady at your goal for a little while to gain an equilibrium, then start bulking and lifting. This is esp true with fasting, as that can have you lose weight rapidly depending on what you do.
You might do light weightlifting. Remember, you have a fair amount of muscle already from just carrying that extra weight, especially on the legs. You don’t want to lose too much of that. Just remember that some of the weightlifting gains may come just from having less fat to shift.