Add custom orderBy in ViewsSort plugin
As shown in this SO answer:

How to sort on different columns in the same view?

the views SQL object uses ->addField instead of ->addExpression. This code ended up working for me:

  public function query() {
    $this-&gt;ensureMyTable();
    $has_custom_sort_id = $this-&gt;detectCustomSorting();
    if($has_custom_sort_id !== FALSE){
      $id_to_top = $has_custom_sort_id;
      $this-&gt;query-&gt;addField(NULL,
        "nid = ".$id_to_top, 'is_match');
      array_unshift($this-&gt;query-&gt;orderby,['field' =&gt; 'is_match', 'direction' =&gt; 'DESC']);
    }
  }


The array_unshift just moves the is_match sort before the draggableviews sort which is also on this View. For some reason, re-arranging them in the View UI caused the draggableviews sort to drop off. Hope this helps someone in the future.