BASIC syntax error (Strange behavior)

LibreOffice 25.8.3 crashes if a BASIC syntax error window appears on both Windows 11 and Linux Ubuntu with versions downloaded from the official website.
.
For example: in a macro, I unintentionally inserted the same local variable declaration twice (Dim sMsg As String). The error window appeared, indicating a BASIC syntax error. Another time, without realizing it, I inserted two closing function braces when calling that function. Unexpected BASIC error.
.
In both cases, it was impossible to close the error window, either by clicking OK or the close button (X). The only way to close it was through the Task Manager on both Linux and Windows.
.
Furthermore, it was impossible to recover and reopen the database. The only solution was to start LibreOffice in safe mode to correct the error.
.
It worked fine under Windows, but Linux (Phew!)
.
What I find odd is that I’ve encountered this kind of error before with earlier versions, but there was a way to close the BASIC error window and simply continue in the macro editor.
.
In this case, the only way to recover the database intact is to boot into safe mode.
.
Has anyone else experienced this behavior?

Do you execute macro code while opening the Base file?
Which security mode you have chosen for executing macros? (Here: Very height, only files in a special path are allowed - so I could move the file anywhere else to edit the file with such an error while opening the file)

I have never had such an BASIC error before, which only could be solved by killing LibreOffice and restart…