If you're looking to lose weight, you should still eat in a healthy calorie deficit during your feeding window, especially if you're doing Leangains (to calculate your calorie target, use this formula). If you're doing 5:2, you can eat more calories on your feasting days; you don't need to eat in a calorie deficit on those days since the two fasting days will give you an overall weekly deficit.