Not true. A military tribunal will cite that violation of oath to the Constitution and act accordingly.
That may hold true for military service men and women, but not civil servants.