Your sample file is an excellent ewample of the dangers of direct formatting. This combines with rounding off occurring in integer arithmetics used inside Writer.
You chose an uncommon font size of 12.2 pt which certainly is not in integer proportion with print area height, opening the possibility of hesitation about layout of the last line (this page or next page?).
Your line spacing is 99%. This setting does not change character size but forces the distance between baselines instead of using “native” spacing encoded in the font. Note that this setting acts inside the paragraph. Add spacing above and below to get total paragraph height (in your case, these spacing are zero).
Your document is direct formatted. This means that you get several anonymous paragraph styles, depending on your editing history. Here, you have 4 (four) different styles. I rule out P3 because it requests a Page Break Before (start of page 2). This leaves 3 (three) styles for the same usage.
It is possible that when switching from one style to another, running space computations are halted and restarted, meaning the last position is converted to “display units” with all the consequent rounding (particularly with font size of 12.1999998pt as encoded in the XML). In particular, an empty paragraph, as you point out, is not the same as a non-empty paragraph.
Empty paragraphs are non-sense in a document: they contain no information; they are invisible to readers. Consequently, there should be no empty paragraphs. Vertical spacing must not be done with empty paragraphs because they disturb the allocation algorithm as you experience.
Vertical spacing is a semantic property of a paragraph, contributing to show visually its significance, just like font face, size or weight.
If you want to have a predictable layout, exempt of the behaviour you complain (rightfully) about, ban direct formatting (including empty paragraphs, sequences of spaces or tabs) and use exclusively styles. Refrain from patching styles with manual actions like size change, bold, italic, … Design a minimal consistent set of styles. Don’t underestimate the value of built-in styles. They are a very good base. All you have to do is customise their configuration. From experience, you rarely need to add more than 5 user paragraph or character styles. It is not the same with page styles because layout varies too much across users to provide a common set.