Change teaching methods regularly
Boring teaching methods, following the same path is also one of the reasons why students work alone, talk, pay less attention, etc. during class time. Let's change this by choosing a new, student-centered teaching method. Keep students busy with interesting questions and tasks so there's no time to break classroom rules. The "unpredictability" in the way the lesson is delivered will make students more interested in participating in the class many times.
Teachers also need to ensure that the current route is most effective for student progress. If the speed is too fast, students will not be able to keep up, and if it is too slow, it will lead to depression and subjectivity to learning too easily. In addition, there are cases where only a few parts of the students feel too fast/slow, the lecturer needs to know clearly which parts of the knowledge they are, in order to have a deeper understanding of the student's current level. Thereby balancing them to repeat the learning path for students as well as for the class.