25 dead ants in a fast growing species isn’t too big of a deal. Sugar water won’t go rotten. Yeasts will ferment it into alcohol, which is something any sugar eating animal is going to encounter all the time in nature. Some insects, such as fruit flies, even seek it out.
I forgot to mention it was actually maple syrup water, which maybe has more organics or something, all I know is that it smelled terrible and was super cloudy. Its good know that, though, now I can stop replacing my sugar test tubes every few days.