str.replace(/(\d)\1+/g, '$1')
// или
''.concat(...str.split(/(\d)\1+/))
// или
Array.from(str).filter((n, i, a) => Number.isNaN(+n) || a[i - 1] !== n).join('')
// или
[...str.matchAll(/(\D+)|(?:(\d)\2*)/g)].reduce((acc, n) => acc + (n[1] ?? n[2]), '')