By the way my 3rd screenshot above has been captured by me when I just inserted original SQL code to the Syntax Highlighting area of SQL. As you can see it only shows totally 22 number of lines.
In fact after I posted it to make you see in public, you might notice that my SQL code has totally 26 lines. In other words my initial one blank line now becomes really two blank lines from my UE moving to Syntax Highlighting area of SQL.
Furthermore when sliding my mouse on my 3rd screenshot previous, which is also different from what I see.
I hope Admin(s) are able to fix this issue as soon as possible.
It's unlikely to be fixed anytime soon. Jive, who provide the platform don't seem to be in any hurry to fix things.
Just do what most people do, avoid using the flawed syntax highlighting and instead, just past your code, highlight it and change the font to something like Courier New so it's a fixed width font, and then, for tidiness use the >> button and Quote option to put the code in a quote box. That also prevents all the other issues from the Syntax highlighting, such as when other people copy your code in to their editor and have all the syntax highlighting line numbers included that they then have to remove before they can execute the code.
Many of these and similar issues depend on what kind of browser you use. You will find different results when using different browsers, like Safari and Firefox, for example.
Syntax Highlighting eliminates white space, which it shouldn't. However if you don't use it, people will get double spaced lines when using copy and paste. So either way, it's useless. Selecting text and changing the font, like courier, also does not work reliably and produces different results depending on your browser.
I don't use syntax highlighting and find it completely unusable. I cannot edit text in SH and what I see is never what I get. You can avoid the double spaced lines when you copy and paste normal text by replacing Returns with Shift-Returns. The later however can be very inconvenient.
You will have to experiment to find out what works best for you, but then again, people will have different results when they use a different browser.