Sounds like a bug described in this [github issue](https://github.com/Azure/azure-cli/issues/17179) where `download-batch` doesn't distinguish between blobs and folder entries. It lists everything in the container and then attempts to incorrectly download "config-0000" as a file, and it writes a file with this name to your destination dir. Then it does a similar thing with "config-0000/scripts", but "config-0000" is a file, and that's where the "Directory is expected" error message comes from.
A possible work around that might have worked for you is to specify a pattern that wouldn't match any of your folders in blob storage like: `--pattern *.json`.