You will follow the orders given to you by your superiors unless they are in direct contradiction with your alignment. (For example, you would not obey the order to execute an innocent civilian if you were Lawful Good).
If a despot were to seize power through legal means like an election you would be more inclined to follow the orders of the new government than if they seized power through a violent coup.