I have had a strange issue with mingw on github's windows runner before, , but this seems different. And the fact I can't repro even with sshing is bizarre.
if you have a windows machine that you could temporarily use, you can set up the GH action to run on a self hosted machine. that might end up being easier to debug since you can inspect everything directly (plus rule out that it is/isn't somehow related to the HW/VM used by the GH action by default).