How to disable automatic style change while writing

If I am typing a text with the Heading 1 style, whenever I press the enter key, the style is going to automatically change to the Body Text style. However, I still wanted to continue using the Heading 1 style.

How can I disable this behaviour so that the current style is never changed and remains the same?
I know that I can manually change between styles but I was just wondering if there is a better way.

The reason I am looking for an answer to this is because I have a personal document with over 100 pages which uses a specific set of styles of the default template. Today, I checked the applied styles and I noticed that some styles which I had never applied were present in that tab (List Paragraph, Table Contents, etc.).

My guess is that LibreOffice Writer somehow automatically changed the style to one of those in a specifc context such as the one I mentioned at the beginning of the post. However, I do not want this automatic style switching because different styles may break the aesthetics and spacing of the document (it already did but whatever). This issue could have also been created by some copy and paste shenanigans or some other formatting issue. I do not know but I am leaning towards what I described.

I guess a possible solution would be to create and use a new template but I would like to avoid this if possible.

This is great but it only works for the styles that you have specifically set.
I am looking for a global solution that is applied to all styles because I do not want to go style by style and manually change the next style of each one.
Is this achievable?

I just updated the topic with my motive to do this.
Maybe now it makes more sense.

The point of styles is to maintain a consistent appearance, this can be broken if misapplied by changing parameters of child styles when the parent should have been changed, or vice versa.

I suggest the chapter on styles in the Writer Guide and maybe a dip into Designing with LibreOffice, English documentation | LibreOffice Documentation - LibreOffice User Guides.

Styles are at the heart of Writer.

???
Styles are precisely the tool to control aesthetics and tune your formatting. Of course, this requires you have already “correctly” styled your document. Styles are a kind of “meta-mark up” of your document. They give hints about its semantics or significance. Thus is how you should read “correctly”.

Next style is part of style-switch automation. configure it for your own benefit.

If you want to “locally” disable automatic style switch, e.g. you’re at end of a Heading 1 paragraph and you want the next one to be also Heading 1, here is the procedure:

  1. type an extra space
  2. back up before the space with (left arrow)
  3. press Enter
  4. delete the extra space and type your new text in the same paragraph style

Spent some time taking a look at all the different styles and it looks like there is only a few styles which have its Next style be something else other than its own style. This mainly happens with all Heading styles, Horizontal Line and probably a few others. Therefore, changing the Next style to whatever fits my needs in this situation is not that troublesome.

However, I still think there should be a way that you can easily update multiple styles at the same time or there is a global setting that overwrites everything. Yeah, I get it that from a hierarchical implementation point of view this should not work or may not make much sense. But, if there is a complex deeply nested hierarchy system, there should also be a method to avoid it for simplicity purposes.

This is precisely what the hierarchical organisation of styles addresses. You get such a hierarchy when a style is created based on another one (right-click on a name in the side style pane and New)

Initially, u.e. before any customisation, the new style starts as “clone” of the base one. More exactly, all attributes are “inherited” from the base and behave as if they were “transparent”, in other words their value or state is taken from the base. When you change an attribute, it becomes an intrinsic property of the style and no longer inherits.

Then you must design a “smart” tree of styles. If you’re careful enough, you only need to change a few attributes in a higher node to forward this change to all descendants.

I emphasised word tree above to insist on the fact that the hierarchy can only be a tree. You can’t have multiple inheritance: a style has only one ancestor.