Democratic governments have privileges bestowed on them by their constituences. I don't remember where the US Constitution gives any branch of government "free speech" rights. It definitely has some protections for speech of officials in Congress and in courts.
Authoritarian governments, of course, have all the rights they manage to grab. Look what Russian officials say. I suppose that North Korean officials can say anything their bosses tell them to say, any public opinion notwithstanding.