I exercise, and in the past I continued to exercise while losing weight. I didn't use exercise for weightloss, but I was doing a bodyweight routine (was traveling at the time) with a little running. My weightloss diet was mostly protien - I strove to get about 50% from protien with the rest about equally divided between fat and carbs. It was a reduced calorie diet and the weight fell off.
Now I still exercise, but for strength, and it mostly consists of barbell routines with some running and walking. I'm also eating higher calories and trying to tweak my macros closer to the above.