You would have to be more precise on how many calories you're averaging per day in order to know if you're really gaining weight will in a calorie deficit, but it's well known in some people the body tries all it can to hold on to its fat stores in times of starvation.
From everything I've studied about nutrition, high-carb/low-fat will make you lose weight, low-carb/high-fat will make you lose weight, but high-fat/high-carb makes you gain weight, such as the SAD diet. All the kinds of foods you mentioned in restaurants are both high-fat/high-carb. You can also get enough calories, but still become malnourished if too many of those calories come from empty calorie junk food.
If you're still having any type of cravings for food at the end of the night, that pretty much means you're either not eating enough, or not getting enough nutrition as I explained when eating too much junk food.
I've also researched where too much fat can block glucose absorption into your cells and if your cells don't get enough glucose, you'll keep having Sugar cravings even if you're getting enough calories. This is how people get diabetes and obese.
I personally recommend high-carb/low-fat diets like 80-10-10, Raw Till 4, Starch Solution, and Engine 2. I would start eating that way, making sure you're getting at least 2,500 calories which active girls need (I'm assuming you don't want to be sedentary, right?!!!). You'll have to start fixing food at home more to avoid all the high-fat food in restaurants, but you got to do what you got to do in order to get better.