White House press secretary Karoline Leavitt is leaving her post at the end of the month amid a string of international crises.