Quote Originally Posted by Dutch_guy
The pope will always side with the weaker catholic faction, meaning the smaller one.

So it means that even if you take a province back that was conquered by another catholic faction who just happens to be smaller than you, the pope will side for him. Even defensive wars aren't allowed.

That must be why factions around me keep getting me excommunicated.

One way you could get away being excommunicated is to ally with the pope early on.