The script does not trigger a change event if the user selects an option by clicking on it but it does if an option is selected by the keyboard.
I have got it to do this by adding these two lines onto the end of the listSet function:
let changeEvent = new Event(`change`);
dl.input.dispatchEvent(changeEvent);
The reason for this change is so if you have any custom code that triggers when the value changes this will then still work as it did.