Two solutions
1.
const data = XLSX.read(byteArray, { type: 'array' });
changed to
const data = XLSX.read(byteArray, { type: 'buffer' });
The answer from HernanATN also solved my problem and seemed to be more trustworthy to go with a different version of xlsx that is more compatible with GAS