Issue with pre_get_posts on custom post type archive pages

If we look in source, we’ll see under what conditions is_archive is true:

if ( $this->is_post_type_archive
|| $this->is_date
|| $this->is_author
|| $this->is_category
|| $this->is_tag
|| $this->is_tax )
    $this->is_archive = true;

The issue is that is_archive is triggering your filter on your post type archive. If you want to exclude those, either make sure it’s not is_post_type_archive, or target the other archives by checking if it’s an author or date archive as well as tag and category and remove the check for is_archive.