Strange trash bin behaviour - files and folder restored at root of the server


I am using Nextcloud 27.0.2.
I deleted many files on my nextcloud following a poorly configured sync.
Luckily they went into the trash.
So I wanted to restore them but surprisingly the folders and files were all restored at the root of the server which created quite a mess for me and also on the devices on which nextcloud is synchronized.
So I don’t really understand the point of this trash bin since the files are nor restored at their original locations
Is this normal behaviour ?
If I had only restored folders, would the files in them have followed?

Thanks in advance