The Church didn’t just start messing around in politics yesterday. I would say their involvement today is actually much less than it has been at some times in the past, and I think that limiting involvement in politics is a good thing.
At the same time, the Pope is a world leader and can’t be expected to never have an opinion on a world issue. Plus, if it’s a case where the church leadership thinks that either the Church itself is threatened or that the human dignity of individuals is being shoved aside or threatened, the Church has a moral duty to speak up, even if its members - and often those in the Church hierachy - do not agree.
Having such a large, diverse Church means that we are likely never going to speak with one voice on a lot of political issues. I find the Church positions can sometimes be good reminders to me of things I should consider, food for thought, no matter how I ultimately end up deciding my own position.
In any event, I hope you don’t leave the Church over politics. Politics, political parties, political conflicts will all pass away. JESUS is eternal. I wouldn’t want to lose him just because I was annoyed by what some bishop said about an election.
God bless you and keep you in the Church.