In order to reproduce the bug:
 Open new text document and insert a simple table.
 Display table styles in sidebar.
 Right click a predefined table style. A context menu only with the item “Hide” is displayed. Here the style can't be deleted.
 Click into table.
 Open dialogue AutoFormat: Table > AutoFormat Styles…
 Select a predefined table style e.g. Box List Blue.
 Click Delete. Then OK. The deleted style is no longer listed in AutoFormat dialogue. Expected: Delete button should be greyed and a deletion of a predefined style should not be possible.
 Close dialogue with Close. In the sidebar the deleted style is still displayed. Expected: No display of deleted style. (Now you can even assign the deleted style to a table. Strange!)
 Close the document without saving.
 Open another new text document and display the table styles in the sidebar. Now the deleted style is no longer listed.
There is no simple way to get the deleted table style back. I only know the possibility to delete the user profile with all its disadvantages.
The bug exists similarly in all versions. Hence inherited from OOo.
Version: 188.8.131.52.alpha0+ (x86)
Build ID: ca6df519a78e5bfc96030c916f242b86306194e5
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win;
Locale: ru-RU (ru_RU); UI-Language: en-US
The current implementation does not allow to remove hard coded TS. So what we have to do, is to disable the Delete button in this case. OTOH, the Autoformat dialog will be removed once the new TS edit dialog is implemented. So close as WF or hope for dev effort?
When you create a new TS per sidebar it's shown there but not in the autoformat dialog (the TS is stored in the document only and disappears when closed). Doing this per dialog makes the style permanent.
Code pointer: https://opengrok.libreoffice.org/xref/core/sw/source/ui/table/tautofmt.cxx?r=d5d99478#289 (sc has extra code and should be handled in the same way!).