Ants are not immune to microwaves, as they contain liquids that would be heated by contact with microwave radiation. However, mic rowave coverage within the oven is far from complete. That's why microwave ovens have reflective metal walls and such things as rotating turntables. Some even have stirrers at the top - rotating metal fan-like fins. These are all used to distribute the microwave radiation as much as possible within the oven and create even heat distribution throughout the food.
The ant in question was lucky enough to have found a cold spot where the strongest radiation did not reach. Additionally it might have been shielded by the actual food. Normally microwaves only penetrate the food to a depth of about two inches. Conduction within the food does the rest.
Alternatively, my best advice would be make friends with the ant in case it develops super powers.