Unfortunately, this happens all too often.
There are two main ways teachers can avoid this happening in their class.
The first is through participatory engagement where activities are designed so that all students have a role in the activity. Sometimes this looks like students answering questions on individual mini-whiteboards so that for every question every student answers and at other times this looks like all students working in small groups on group-sized whiteboards (see non-permanent vertical surfaces).
In both cases, the key idea is that in order to prevent some students from not getting on the plane, the teacher needs insight into what every student is learning.