The route runs through the switches in a specific order. Move to the top blue dot, then across to the second switch. From there go to the moving blue dot, and return to the second switch.
Next, drop to the bottom blue dot and continue to the first switch. From the first switch, move to the last blue dot, and finally on to the red dot to finish the level.
The trick is that the switches change which dots are safe, so backtracking over a dot you already used is expected rather than a mistake. Draw your lines to make that loop continuous and the pencil will complete the path without falling.