Cursor jumps to heading after paragraph style change

I’m using Windows 11. In Libre Office Writer v. and previous versions, when I place the cursor in a paragraph and use the “set paragraph style” drop-down menu (located on the toolbar above the text area) to select a different style for the paragraph, the cursor jumps immediately to the preceding heading. If there are several paragraphs under that heading, I may have to scroll through a couple of pages before I can get back to the one I was working on. It happens on all of my .odt files with headings. Is this supposed to happen? Is there a way to prevent it?

Please edit your message (click on then on the “pencil tool”) to mention OS name, LO version and save format.
By “drop-down menu”, do you mean the style menu in the toolbar above text?

I never experienced such a “glitch”. It may be related to some contents. Could you attach the file to your question (the tool is the “Outbox” with up-arrow icon).