One method to resolve this is to place the action of removing the button styles in a function and placing it as "onload" in the "body" of the html.
<body onload="removeButton()"> // ....
const validateInput = ({ target }) => {
if (target.value.length > 3) {
button.removeAttribute('disabled');
return;
}
// **** here****
removeButton()
}
// ***** Here *****
const removeButton = () => {
button.setAttribute('disabled', '');
}