What you experience is related to special properties of Internet Link character style.
Read my answer to question Use another style for links.
EDIT 2019-04-08
You must first throughly understand style hierarchy:
- lowest priority: paragraph style
- character style
-
Internet Link or Visited Internet Link (implicitly added by LO Writer)
- highest priority: direct formatting
There is also the way overriding attributes are handled in the layers. Every style attribute has n+1 states: the n obvious ones – e.g. checked/unchecked for toggling attrs (2 states), font variants like roman, italic, bold, bold italic (4 states in this examples), font size (many states) – and a technical one “transparent”. Whenever you manually act on an attribute, you create an overriding state. For example, unchecking a box creates a clear overriding state taking precedence on the parent/lower style. The fact that the box is unchecked does not mean the value in the parent/lower is used. To revert to the parent/lower value, the attribute must be reverted to “transparent” with the Standard
button. Beware that the button reverts all atributes in the currently displayed tab to “transparent”, so you need to reset the needed overrinding attrs.
In your case, you must proceed in an orderly fashion because it is very difficult to manually apply several styles to the same chunk (and presently not reommended to try).
Start by returning your document (at least only the paragraphs containing bookmarks and links) to a clean initial state by removing all direct formatting (direct formatting should be avoided whenever you work with styles; you even have no visual clue that direct formatting has been applied) and character styles. The URLs should still be formatted Internet Link. Make sure all URLs are recognised as such. If some are not, erase them and retype them in order to get the correct hyperlink attribute (Writer will add Internet Link character style).
Define character styles: the one for bookmark and customise Internet Link and Visited Internet Link paying special attention to the hierarchy described above and the “transparent” attribute state in the top styles, Internet Link and Visited Internet Link so that the lower attributes are visible through the top styles.
When done with styles, select your bookmarks, eventually your URLs and style them with the bookmark character style. This will add the style “between” paragraph style and Internet Link.
If you do it the other way round, i.e. the bookmark style first, then Internet Link, you end up only with Internet Link* becuse you can manually only add one style. Every manual addition replaces the previous manual addition. The tricky URL formatting relies on the implicit Internet Link formatting by Writer.
If you still don’t succeed, attach your file or a sample of it.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!