As per the FIXME comments in the code for src/, this patch improves the handling of the fileId delete behaviour.
Files can have multiple parentReferences, meaning the same fileId and name can show up as a childReference in more than one folder. However, outright deleting the fileId would remove it from both folders which might result in an unintended loss of data. Therefore, we first check if the file has more than one parent - when this is the case we find the parentId of the current folder and remove that parentId from the fileId. If the fileId has exactly one parentId, we delete the entire fileId rather than removing the last parentId (which would cause the file to become invisible in your GDrive).
Please note this patch depends on a bugfix which should be rolled out in LibKGAPI: https://phabricator.kde.org/D9774