Diet and Weight Training are going to be the main 2 things to help mitigate that effectively. Not saying cardio doesn't work, however, weight training drives your body to spare lean muscle mass (muscle) so that when you are in a calorie deficit, fat and carbs are burned for fuel predominantly. As for the nutritional side, it doesn't matter if your diet is composed of only Carbs, Protein, Fats, or any combination of those; the only thing that matters is calories in < calories out. It's that simple. Any diet that restricts a macronutrient is not the best option as a balanced diet containing all 3 macronutrients is pretty ideal for most people.
Once you have the basics down then sure, start experimenting with ratios between the 3 and find what works for you. But I guarantee you didn't walk before you crawled. Basics come first. And no, Keto is not magical. I have personally done it in the past and saw amazing results: Lost 70lbs in 18 months; however, once I decided I wanted carbs back in my life, the weight came back on within a few months.
Source: Collegiate Strength & Conditioning Coach at the D1 Level & High School Strength & Conditioning Coach