Disable query auto detection

<?php
/** Disables FacetWP's automatic query detection.
 ** With this code, queries must be explicitly set to enable FacetWP:
 ** Use a Facetwp Listing Builder listing templates,
 ** Use a WP_Query with 'facetwp' => true (custom queries or added with pre_get_posts or other filters),
 ** Use a page builders with an "Enable FacetWP" setting.
 **/
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
  if ( true !== $query->get( 'facetwp', false ) ) {
    $is_main_query = false;
  }
  return $is_main_query;
}, 10, 2 );