Sometimes an attempt to use the script Flash-on-Windows.bat may fail and give a misleading error report, like that in the picture below.
The conflict with the installation script is related to the error messages in the picture above. The commands 'findstring', 'ping', 'find' etc. are used and needed in the script but in this case, they fail as the Windows command terminal cannot find them. This makes the script misinterpret the situation so that it believes that the bootloader is still locked.
The output from "fastboot getvar all" proves that the bootloader is already unlocked.
We have seen the same previously a couple of times. In those cases, the customer had used the Windows PowerShell (instead of the cmd terminal) which may sometimes have some conflicting environment variables defined (for those commands above). It has helped to undefine the variables or else, to use the Windows CMD terminal.
There is information about similar cases on the Internet, also with the CMD terminal, unfortunately. The following page [1], for instance, seems to discuss a similar issue. It may help you out from the problem, after which the flashing script most probably works.
[1] https://helpdeskgeek.com/how-to/fix-not-recognized-as-an-internal-or-external-command/