Text lines disappear strangely in vertical writing mode

I wrote a CSS snippet for own use. It just change writing mode to verticality and tune element width and height, no changing anything else. (for why need to change the width and height, please see this topic )

And I upload my code onto Github.

As long as I turn on the snippet, some lines will lost in editing mode. Checking console, it’s not a style problem (like text are hidden or out of range) but a content problem. I mean the cm-line element of some lines disappear. It’s very strange.

This is a video for detail:

@Saaan
Do you have any idea about this?

The problem may have something about this topic.

Do you fix your problem?
@the_tree