Делаем просто:
const result = Object.values(arr.reduce((max, n) => (
max[n.group] = +max[n.group]?.score > +n.score ? max[n.group] : n,
max
), {}));
Делаем сложно:
function group(data, key, val = n => n) {
const getKey = key instanceof Function ? key : n => n[key];
const getVal = val instanceof Function ? val : n => n[val];
const result = new Map;
for (const n of data) {
const k = getKey(n);
result.set(k, result.get(k) ?? []).get(k).push(getVal(n));
}
return result;
}
function max(data, key = n => n) {
const getVal = key instanceof Function ? key : n => n[key];
let result = null;
for (const n of data) {
const val = getVal(n);
result = result?.[1] >= val ? result : [ n, val ];
}
return result?.[0];
}
const result = Array.from(
group(arr, 'group').values(),
n => max(n, m => +m.score)
);