Yes, foreign countries have technology that can take out a carrier. But in a lot of these simulations the battle group is rarely at full strength.
Because of the non threat against modern fleets they rarely sail at full wartime strength where they would have a lot more defenses at their disposal.