Acting US Secretary of Defense Patrick Shanahan has stepped down as head of the Defense Department.