I would put money on it being spaces in the paths. Ideally, put everything in places that don’t need spaces.
It’s little known but all paths in windows still have an 8.3 name, but I think the only way to see it is to use a DOS prompt and “dir /X”. The 8.3 name can be substituted for the parts containing spaces.
Another option is to install a different XML processor, e.g. Saxon BOM generation in "new" Kicad (Windows)
Or use a Python tool to generate the BOM KiBoM - Python BOM Generation tool
Or generate bom from pcbnew Fabrication Outputs->BOM File