Why do you believe that makes a significant difference? And if so how big difference does it make?
Can I eat 2000 kcal with one diet and gain weight and 3000 kcal with another weight and lose weight?
Can I eat 2000 kcal with one diet and gain weight and 3000 kcal with another weight and lose weight?
What you eat will of course matter when it comes to nutrition, muscle gain, satiety and many other factors but that in itself does not generally remove that a calorie is a calorie (unless extreme diets).