Vanilla Javascript - reinitialise after AJAX call

it shouldn’t. Something in your code must be causing it but as you haven’t included the code it is impossible to say what you have done to cause it.