If someone was told by their boss to go rob a bank, that employee would still be a criminal if they did it.
This applies equally to federal agents carrying out the orange wannabe dictator's police state ambitions.
Following orders is not a defense in court after you're prosecuted.