Justified alignment sticks 'space' character to the 'edge' of page if manual row break was used

Hello!
When I typing text using justified alignment everything is working well. But if I am inserting manual row break Writer sticks ‘space’ character to the ‘edge’ of page instead of word (doesn’t matter at start or end of a line). So I need to delete spaces manually for proper alignment if I use manual row breaks.

Example of odt file:
Example.odt (19.9 KB)

Libre Office:
Version: 7.3.7.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: uk-UA (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.7-0ubuntu0.22.04.4
Calc: threaded

OS:
Linux Mint 21.2 Cinnamon 5.8.4

Your Example.odt sample file does not show explicitly before/after states. I then assume you simply inserted Shift+Enter without modifyiing existing text. Writer will not delete characters on its own, be they spaces.
So, if you didn’t remove or select space between words before inserting the break, the space will either be at end of line (where it is usually harmless because it will be flushed into the margin) or at start of line where it is clearly visible because causing misalignment on margin.

Fix: select space before type the break or, as you do, delete the undesired space after insertion.

So, You mean there is no possibility to do it like in msoffice (when you just put shift+enter for row break and text aligns properly and keeps ‘space’)?

I don’t fully understand “text aligns properly and keeps ‘space’”. What do you want to get after row break insertion?

You must be aware that “row or line break” does not end a paragraph. You still are in your initial logical paragraph. A paragraph is a basic unit of significance. Therefore, it has a homogeneous format over all its lines.

Inserting a row break is not a trivial operation. Since you don’t break the paragraph, how should the broken line be formatted? The question is mainly relevant when your paragraph is justified. You can
a. justify the line, as if it were full: it extends from margin to margin;
b. consider it is equivalent to a weak paragraph end and left align it

Semantically, row break and paragraph break are not equivalent. Don’t be tempted to use a line break only for the effect of not having vertical space between two “real” paragraphs. Instead think deeply and thoroughly about the significance of a reduced spacing between two paragraphs. What kind of meaning do you want to infer in your reader? Then design adequate paragraph styles corresponding to this significance and apply them.

Now what about the (horizontal) space which is “replaced” by the break? Since in Writer author is the boss, Wrtier won’t remove anything typed on the ground that if author typed it, it is important, even if author is wrong (e.g. US usage of double-space after punctuation).

Remember that Writer is not a drop-in replacement for M$ Word. Writer is based on different principles than Word (notable the extensive concept of styles) and this also “leaks” on the user interface. Frequently Word imposed upon us erroneous habits (by erronaous I mean turning away from traditional typography usages).

Writer is a new tool for you. Study the differences to make highest benefit from the suite. If you disagree, you can always revert to Word.

I mean: in msword if I press shift+enter it will break the row and stick last to word in the row to the right edge ignoring ‘space’ character (it will be just beyond the right edge). In Writer if I press shift+enter it will break the row and stick ‘space’ character to the right edge.
And my question is, it possible to have same behavior for breaking rows in LO Writer as in MS Word?
I don’t need to make new paragraphs. I just need to break the rows sometimes to keep formating proper according to inner rules.
You may see examples in screenshot below

The behavior when the manual line break is before the space is correct: the space starts a new line, and the rest of the text gets indented. Word does the same. And this should not change.

But behavior of space followed by line break is wrong. Reading Unicode® Standard Annex #14 “UNICODE LINE BREAKING ALGORITHM”, there is no direct discussion of a SP BK case; but there is SP section, discussing the invisibility of spaces in the end of a line (not measuring for fit); 9.2 Legacy Support for Space Character as Base for Combining Marks discusses that spaces before combining marks does not change space-at-the-end behavior.

And indeed, there is a logic behind the manual line break, which is “overriding automatic breaking behavior”. There should be no other effects for a user, other than explicitly telling where to break. Changing the behavior of justification is such a wrong side effect, and it is a bug: tdf#57187.