Persist selection after markjs instance.mark(tx)

I am using markjs.io to highlight content on my page on-demand – but I want to retain any range selections once the marks are added – currently it’s inconsistent between double-clicking on a word verses selecting a word using mousedown-move-up … both seemingly random in their result

enter image description here

I am marking the selections using the following javascript:

const selection = window.getSelection();
let findtx = selection.toString().trim();
var instance = new Mark(document.querySelector('#container'));
nstance.mark(findtx, {
    done: function() {
      instance.mark(findtx, {
        caseSensitive: false,
        separateWordSearch: false
      });
    }
  });

Runtime example available on https://jsfiddle.net/Abeeee/9guLs35w/20/