Hi Fridolin,
as it seems you've found a bug. This is a known issue and seems to be related to the Windows com port driver. Even after a long research it seems the script (respectively the flash command in it) doesn't cause the problem.
Anyway, we can recommend a work around. For that could you please start MCUXpresso respectively the GUI flash tool BEFORE you try to flash the Master demo or use the GCC makefile project.

Then MCUXpresso probably shows the connected board correctly in the probe discovery window as you can see here:

After this is done, you do not need MCUXpresso anymore and you can exit it.
Now the master demo and GCC makefile project should flash and work as expected.
Does this works for you too?
Best regards,
Tim