Javascript in theme component only runs once?

That means the script isn’t available. This isn’t really a Discourse question, but:

<script src="https://api.reftagger.com/v2/RefTagger.js"></script>

<script type="text/discourse-plugin" version="0.2">
  api.decorateCooked($elem => {
    refTagger.tag($elem[0]);
  });
</script>

should work.