Top federal prosecutors in New York withdrew from an annual event hosted by the City Bar Association, which has been critical of President Trump’s policies.