Corporations are creatures of statute. Governments provide for their formation, but do not have to do so. Any restriction government wants to put on them, it can. This means the Citizens United decision applies only to corporations as they were, and can be made moot by statute.
https://www.brennancenter.org/our-work/research-reports/citizens-united-explained
is one explanation of the decision. There are many.