For Abu Hanifah, an unexcused exit breaks the required presence even if brief. Abu Yusuf and Muhammad treat a brief absence differently and specify the threshold of more than half a day.
This is an intra-Hanafi disagreement. Both positions belong in the lesson, with correct attribution to each jurist.