Excommunication is a specific canonical penalty for specific canonical offenses. At this time being a politician who votes for legislation that legalizes access to abortion, while being a grave sin that imperils their soul, is not something for which someone can be excommunicated.
As for why such a politician is identified as being Catholic, its because they are Catholics. They might not be good Catholics, but they are Catholics nonetheless. Once a person is baptized (or received) into the Catholic Church they are forever a Catholic (semel catholicus, semper catholicus). Canonical penalties may be imposed upon them, but they remain Catholic.
Even if they were excommunicated, they are still Catholic. Excommunication does not “kick someone out of the Church.” It is a medicinal penalty (canon 1312 §1, 1) that is meant to awaken the conscience of the person to whom it is applied and call them back to the truth. Canon 11 states that Church laws apply to everyone who has been baptized Catholic, it does not make an exemption for those who excommunicated or even for those who have joined another church. Those who are excommunicated lose all of their canonical rights (e.g. the right to receive the sacraments) but they are still considered members of the Church and are still considered bound by their canonical obligations. Therefore even if a pro-abortion politician was excommunicated, he or she is not only still Catholic but is also still obligated to attend Mass on Sundays and Holy Days of Obligation (though he or she cannot receive communion).