It is not clear in your description which lines have “moved right” and how? Indented, indented first line?
If your Heading is direct formatted and set to have a hanging indent and you have ticked the box labelled Automatic then the first line of your paragraph text will include that direct formatting and be indented also.
In the image below, I have set the heading to have a 2.70ch (10mm, 3/8") indent with first line having an equal but negative indent (hanging indent). The Automatic box is ticked so it seems the following paragraph text is indented a further 2.70ch.
DirectFormattedHeading82338.odt (32.1 KB)
You can fix the problem I created by selecting the heading and the following paragraph and clicking Format > Clear Direct Formatting (Ctrl+M).
Clearing direct formatting might fix your document; it always makes document management easier if there is no direct formatting anywhere.