I had similar issue even when calling function properly. I've added event listener after clicking on some button and function was calling immediately. It was due to race conditions and event bubbling. Parent button click event haven't finished bubbling and was picked of this just added event listener. After adding setTimeout for 0 milliseconds it was fixed:
onSomeButtonClick(event) { // function that is fired after button click
this.setEventListener(); // add event listener on click
}
setEventListener() {
setTimeout(() => {
this.document.addEventListener(
'click',
this.handleOutsideClick // function I want to fire after click
);
}, 0);
}