The dueling moves reflected how federal law enforcement officers have at times been put in the position of pursuing the Trump administration’s shifting political agenda.