Intermittent fasting is not, by itself, a diet. All it means is that for a period of time you don't eat.

When you eat does not matter in the context of fat gain or fat loss. Calories matter.

Regardless of what protocol you follow to lose fat, you will regain what you lost if you return to your previous eating habits. To maintain the loss one must not resume the dietary habits they followed prior to dieting. This is why people on this site will often refer to the changes they are making as lifestyle changes and not a temporary diet.