See https://github.com/gjb2048/moodle-format_topcoll for initial issue report.
The core css contains .section li.activity.hasinfo which causes these lines to appear in collapsed topics with no way to remove them without overwriting core code.
The lines create a large amount of whitespace between every item, adding to the scroll of death. This is especially disruptive if courses already have a structured layout such as using labels for subheadings, as it becomes harder to see which elements are grouped together. Adding linebreaks should be a design choice by the user, not the core code.