Вместо
filterInput.addEventListener('keyup',...
пусть будет
filterInput.addEventListener('input', function() {
const value = this.value.toLowerCase();
filterResult.innerHTML = resultArr
.filter(n => n.toLowerCase().includes(value))
.map(n => `<li>${n}</li>`)
.join('');
});
или
filterInput.addEventListener('input', e => {
const value = e.target.value.toLowerCase();
filterResult.replaceChildren(...resultArr.reduce((acc, n) => {
if (n.toLowerCase().indexOf(value) !== -1) {
(acc[acc.length] = document.createElement('li')).textContent = n;
}
return acc;
}, []));
});