Losing fat while pregnant

Is there a safe way to lose fat while having a growing baby/healthy pregnancy?

I was just starting to lose weight by consistently working out and counting calories/limiting calories when I got pregnant 4 weeks later!

I am IN NO WAY wanting to restrict in a way that harms baby. I’m just wondering if anyone has ever continued a workout program and healthy eating while working out and lost FAT/gained strength and muscle tone while growing a healthy baby.