AG-Grid: How to exclude selected rows from setQuickFilter?

My AG-Grid table utilizes setQuickFilter to filter rows by user input search criteria. The grid also has rowSelection enabled for other actions. My goal is to exclude selected rows from the search filter so that they always render in the grid regardless of what data the user is searching.

I attempted to conditionally call setQuickFilter only on unselected rows, but setQuickFilter is a method on the grid API and applies to all row data (e.g. gridApi.setQuickFilter(data))

I also attempted to use isExternalFilterPresent and doesExternalFilterPass to add my own filtering logic, but these appear to only run on the initial grid render rather than dynamically updating when selected rows and/or search filters update.

Is this type of filtering possible with current grid capabilities?