A well-meaning, good-intentioned cause is ruined when politicians are allowed to use it for their own goals.
The church is supposed to be unifying, a place where people understand that although they are different their intention is for good. We come to Church pray for good, ask God for his will to be enacted because we believe that's ultimately for good. Then we meet, have tea, laugh, do charity activities like helping the homeless (which everyone can get behind). It's all unifying stuff.
Politics on the other hand is by design divisive. Democracy is about people voting for different things and politicians represent those differences. How can any Church that claims to be unifying in good conscience invite a politician to preach at their Church knowing this. Yes you can excuse it by believing your particular politician is good and their message is in keeping with the Bible, but what if the person next to you disagrees?
Yes, get out and do political activism, protest, vote the way you want, that's fine, but leave the politics out of Church. As Jesus said, "Give to Caesar what is Caesar's, and to God what is God's."
And the moment a politician's purpose is no longer served by the Church, they'll waste no time in throwing them under the bus (as with any other social cause). Take for example this story from the BBC in which Keir Starmer apologises for visiting a Church with Biblical views on LGBT stance. There are very few Churches with what LGBT would consider favourable views.
In the U.S the same day Donald Trump spoke at Robert Jeffress's Church, Maxine Waters spoke at a Los Angeles Church, ranting about Joe Manchin not supporting the "Build Back Better" bill, and gave a $5,000 check to the pastor, who called her "our leader" while introducing her. In Maxine Waters case, she took the opportunity to give a lengthy sermon on why the Democratic legislative agenda was God's will. Read the full story from not the bee.
Politics is slowly replacing the role religion took in people's lives and as a result, the politicians are slowly taking the place of religious leaders, prophets, or even gods. Look at how Donald Trump, Jeremy Corbyn, Hillary Clinton are treated and revered, their promises are treated like proclamations, their words are seen as commandments and they are trusted like they have no faults. Inviting them to preach from the pulpit further adds to this and it goes against one of the main Christian teachings of not worshipping a man as God.