4 of my buddies are doing a weight-loss challenge ahead of this spring's local marathon. They're each losing about 10-12 pounds over the month of January.
3 of them kept their calorie intakes roughly the same but changed their macros to favor protein and fat (and no changes to their exercise regimes). All 3 have already reached their goal without significant loss of muscle mass. One guy switch to the keto diet for January (<25g carbs/day), and is at 16 pounds lost as of last night. The 4th guy lowered his caloric intake but maintained his carb-heavy diet. He's lost 4 pounds, and he's struggling with hunger and trying to lose more weight.
You'll definitely still lose weight if you calories consumed < calories burned. But you'll lose more fat if those calories are consumed in the proper ratios. Increasing protein consumption while at a caloric deficit minimizes muscle loss, especially when combined with (even minimal) weight training.