A senior prosecutor who played a key role in New York's investigations into former President Donald Trump has moved into private practice.