Maybe this is because your script is executable and Windows Linux Subsystem tries to execute the first line differently from the rest of the lines.
I don't have a system handy to test this but try adding a shebang line as first line of your script.
something like this
#!/bin/bash
mkdir test1
mkdir test2
mkdir test3
And save the file as a UNIX file because as you already figured out Linux/Unix systems use \n as a line sperator instead of \n\r like Windows does.