Trim search filter to prevent from creating invalid search criteria when skip_deleted = true.