Deleted shared folder (shared via link) still present in oc_share database

If I delete shared folder permanently, it’s still present in oc_share database. Why it’s bothering me beside database keeps unnecessary records? I’m using oc_share from another app ONLY to list shared folders.
When I unlink folder first, than it’s gone from database.

Is this normal behaviour or…

I can’t reproduce this under Nextcloud 24.0.0. Which version are you using?

Same version 24.0.0.

Do you se something in nextcloud.log during deletion?

I just checked, and no, upon deletion there is no message in log, but after I permanently delete a linked file, logout and login back, there is an error:

…“app”:“PHP”,“method”:“PROPFIND”,“url”:"/nc/remote.php/dav/files/user/",“message”:"disk_free_space(): No such file or directory at… etc

and ok, I expect that because there’s a still a record in database. After I remove manually file from oc_share, again as expected, error is gone.

To be honest, when I installed NextCloud, I put it outside /www/ and put a symbolic link inside /www/, I checked all warnings in overview, did all I could do, still had something about carddav and webfinger, now the warnings are magically gone…

Maybe I messed something up during install or messing with config files

EDIT:
Found same problem reported: https://github.com/nextcloud/server/issues/7238