"you can't fire a state employee for criticizing an elected official" isn't entirely true, though. If the Governor's press secretary gets up to the podium and says "my boss is a corrupt fuckwit", they'll get fired, because of https://en.wikipedia.org/wiki/Garcetti_v._Ceballos.
Professors at state universities are state employees and you can't fire a state employee for criticizing an elected official.