A common misconception is that sweating more means a more intense workout. This is false. Sweating simply means the body wants to cool down. Otherwise people could get completely ripped sitting in a sauna.
I've heard claims that sweating more lowers weight, which is true. It's just water and salt. It all comes back in the next meal.
Working out in a gym might make a slight difference in caloric burn because the extra energy it takes to produce more sweat. On the flip side, working out in a freezing gym might make a slight difference because of the extra shivering. If all things are equal, working out in a warm gym would hold the advantage.
The single deciding factor of success in the gym will be whether you perform to your fullest ability each workout, and being consistent. Doing half the work because you're uncomfortable will result in less progress regardless of the gym temperature. Skipping the scheduled workout because it's too unpleasant will halt progress.
Some people can workout in super-hot gyms, and may even prefer it. That's great as long as they are practicing progressive overload and not lowering volume to compensate the added stress. Some people may work better either physically or mentally in a more moderate temperature. That's fine as well as long as they are practicing progressive overload. The people who stay consistent are the people who progress.