You have to make sure as a teacher to keep your students interest level high during an online lesson, it might even be considered the hardest part since unless in a physical classroom, where students have to sit and have no other options than paying attention to the teacher. In case of a live online class, there are plenty of external factors that could interrupt them during your lesson.
The main goal is to let them join the lesson, ask questions and always switch topics if they seem bored. The more interactive a task and personal an exercise is, the more attention you will receive as a teacher.
If the course is a bit more dry and there is no place or time for interactivity, you can still use the chatbox during the lesson to keep the engagement level high. By sharing pictures, videos and external links to the chat box or the Whiteboard you allow your students to see real-world examples of the theoretical part of the class.