Following the US Constitution, yes, the same 1st amendment right of separation of Church and State that prevents religious not-for-profits from having to file tax returns (even less governance than for other not-for-profits) should also require those religious institutions from not engaging in politics.
But the Constitution was, itself, a document created to stave off the tide of human greed and lust for power. All great presidents, starting with Washington, have warned that the heart and mind that created the Constitution has to be renewed in each generation, or we will lose our democracy.
For the last 60 years - if not longer - we have allowed special interests - first the military-industrial complex, then others - to operate with an underlying purpose of greed and lust for power, limiting Constitutional obligations (all freedom comes with responsibility), creating biased interpretations of the Constitution, creating laws that are not constitutional and not challenging them well, creating regulations that are not constitutional, and not enforcing laws and regulations that uphold the Constitution.
Since the 1970s, religious elements, starting with the Christian religious right, began to join in the fearful, greedy quest for political power. And now, more and more, we are seeing the results of decades of neglect for our fundamental values.