Her appearance veered into a referendum on her leadership at DHS amid mounting public scrutiny of the department’s hardline immigration enforcement tactics.