Organizations like Planned Parenthood are also 501(c)(3) and their leaders are very politically active. That is different than the organization itself using the money it collects to engage in political activities. If a church were found to be doing that, they would lose their 501(c)(3) status with the IRS.
The takeaway from that fact is that Planned Parenthood should lose that status as well, not that the church gets the same right. If a tax-exempt organization breaks the consensus, it needs either a) correcting or b) to lose their status as a 501(c) organization. It is not an opening for other organizations to break consensus as well.