We worked on this issue already, see T250262: Empty line differences confuse TwoColConflict UI. However, the patch https://gerrit.wikimedia.org/r/592607 left a bogus edge-case behind: When a user does nothing but increasing the number of linebreaks, there was a chance these linebreaks get lost.
Reported by a user: https://www.mediawiki.org/wiki/Topic:Wavepm145vjst1n9