I followed my own instructions for how to transfer folders between different Google Drives here How to copy a shared folder into my own Google Drive?
Basically, share a folder X from account A to B and give B edit rights. Now right-click on X again and a new option has appeared "Make B owner". This also removes A as owner and makes A editor of X.
I then changed A from editor to viewer and then, as A, deleted a file. Surprisingly, this was allowed and it also removed the file from B's account and put into B's Trash (as well as A's Trash).
After changing the owner of X, the folder was "orphaned" on A's account. The only way to find its content is to search for a file in it. In other words, you can't start at the root of A's drive and browse to it.
X consumes the quota on BOTH A's and B's account. This is weird. The deletion issue described above indicates that X is stored in just one account (although the fact that the deleted file ends up in both A's and B's trash says something different) but the quota usage indicates that X is duplicated.
I have waited a couple of days in case there were some delays in updating the quota usage or similar.
On A, X is listed under Shared with me.
How do I sort out this mess? I want X at account B, and only there, and recover my space at A.
Update 1 with more details:
If I look at X's share properties in account B, it is not shared and B is listed as the owner, just what you would expect. However, if I, from account B, look at file F located in X, A is listed as owner and B is listed as editor. This was not expected. A visualisation of the file hierarchy:
B/ (root folder for B) B/X (X is a folder and owned by B and not shared) B/X/F (F is a file and **is** shared and owned by A!! B only has editing rights.)
From account A I tried to change the owner of F to B but that operation was not allowed.