UPDATE:
I just noticed a pattern: the quantity of whitespace entered on empty lines is equal to the number of indentations on the line just above it minus one.
So if the above line is indented 3 times with 3 tabs, the following line would have 2 tabs.
Or if spaces are used and the indentation is set to 4 spaces, then the line with the code has 12 spaces and the "empty" line has 8.

This is the most important bug for us. Because if we beatify all of our code now, when you fix this (later) a subsequent beatify command will introduce a lot of changed lines in our version control.