The folders are created according to your settings in Files & Links
and Default location for new notes
for new link format. I am not sure how those two interact when you specify the folder as part of the links. As far as I know if you have Shortest path when possible
this means at the root of your vault.