Women leaders tend to have more engaged teams and drive better job performance — and their departures can hurt organizations for years to come.