Brian McGrory, chair of the Boston University department of journalism, will return to The Boston Globe as editor, a position he previously held from 2012 to early 2023, the paper announced Monday.