Modifications in table of content are not saved

Hi to everyone. I have created a table of content in Writer (LO 5.2.5.1) and I have disabled the flag for “Protect to manual modifications”.
I can manually change the text of the entries in the table, but they are not saved! If I refresh the index, the old text is shown. Is it a bug or do I something wrong?
Note that when I apply changes or add/remove entries to the table, the undo/redo buttons don’t works. They don’t notice about the changes.

The idea of TOCs is that they are automatically generated from the document content and the styles/TOC format chosen. When you refresh a TOC it builds again from that information: unprotected TOCs should be a last resource that it is better to avoid at all cost. So the question is why are you manually changing the TOC? Notice that in addition to the outline numbering (and the fact that you can set any outline level to any paragraph style) you can add any “normal” paragraph to the TOC without modifying the TOC itself: select the text → Insert → Table of content and index → Index entry → select Table of content → select the Level → Insert.

Thank you. I mean to change merely the text descriptions of the entries, not the structure.
E.g. change the text for page 1, from “Xxxxxx………1” to “Yyyyy…….1”.
It is much more quick and comfortably to edit the entries directly in the table, instead of to jump to each marked point in the document, then right click → index entry, etc…
especially when you have many entries in the menu.
The function to change the texts is enabled, then it should save the changes when you have done.