Why do my LibreOffice macros disappear

I have a variety of macro files which LO has stored in ~/.config/libreoffice/user/basic/Standard and noted in script.xlb in that same directory. Now and then I start LO and it turns out that it has forgotten my files and only knows about Module1, which it seems to have created itself.

The macros sources are still in that directory, and I can manually edit script.xlb to make them visible again.

The same sort of thing happens with dialogues and dialog.xlb, but is marginally trickier, as it knows no dialogues at all and has reduced the tag to <library:library etc />, requiring more of awareness of the syntax to correct.

It happened just now, after my OpenSUSE Linux 15.3 system hung and had to be brutally stopped and restarted. I was running LibreOffice 7.5.03. I was also not offered a chance to recover the files I was working on, although that normally works fine. (I have since updated to 7.5.1.2, but was running 7.5.0.3 before and after the restart.)

Is this a bug or might I have done something wrong?