FYI-While it is alway better for a federal LEO to state their status when dealing with potentially assaultive behavior, there is longstanding case law in multiple circuits that the potential defendant's knowledge of the potential victims's "federal" status is not a required element of the offense under 18 USC 111.
See-United States v. Feola, 420 U.S. 671, 676 n.9 (1975) (finding “the existence of the fact that confers federal jurisdiction need not be one in the mind of the actor at the time he perpetrates the act
made criminal by the federal statute.”). See also United States v. Wallace, 368 F.2d 537 (4th Cir. 1966) (same). The law is the same in my "home" circuit as well. See- United States v. Lynch, 58 F.3d 389, 391–92 (8th Cir. 1995).
While this case is a state case, I would note that MD is in the 4th Circuit such that federal law might be instructive on the issue should this go to trial.