separates the heretic from the Church
See this is the complex part of this principle which has to be delved into deeper. As it's written, it's too general.
1. HOW is one separated from the Church? Spiritually, obviously, due to sin. But also, physically separated (i.e. the office is lost)? This is one of the main things that St Bellarmine and everyone else of his time debated. Everyone agreed on the "spiritual separation" but they disagreed on the physical separation happening WITHOUT some physical legal, govt act by the Church.
Conclusion - There is no conclusion. It's debatable.
2. WHEN is one separated from the Church?Is it immediately? Or is there a time period of "correction" as St Paul tells us, is necessary.
In the case of Martin Luther...when he hung up his 99 heresies on the door of the church, was he immediately separated from the Church? Maybe. Maybe not. Spiritually, it probably depends on if he understood what he wrote was heresy, or if he was confused about some points of doctrine (which, at the time, was very corrupted due to corrupt clerics). This is why the Church has a hearing/trial to distinguish the pertinacity/mindframe of the heretic.
After such a hearing occurred, Martin Luther did recant maybe 30-40 of his "issues" so it's not like he was 100% sure/firm on his errors.
Also, did Martin Luther immediately lose his office of priest/prior (whatever his office was, i'm not sure)? I don't think he did. He might have been suspended until the trial/hearing but nothing was lost "immediately". And his act of heresy was public, manifest, etc.
Conclusion - again, no conclusion. It takes an act of the Church to decide these matters. Canon law has a process. Even if spiritually, the person is judged by God immediately...but no one can know that "at first". Only the heretic knows what he believes. We are human beings, who live in the physical world. It takes physical action, and human efforts to discern heresy and judge accordingly.