The input eventListener has its third parameter set to false. But this optional parameter can be an object with a specific key to achieve your desired result.
If you want to preventDefault behaviour for submit button you can do
input.addEventListener("keyup", search, {passive: false})
But considering that you are listening for a "keyup" event.
What is the default behaviour of this?
Do you need to set this optional parameter?
Have a look at MDN for reference
EventTarget.addEventListener()