Search by category displaying wrong items

I don’t typically do what you are doing the way you are doing it – but the glaring thing to me is that your setting your tax query with the associative key of 'tax_query1', which as far as I know shouldn’t work. It should simply be called 'tax_query'

Try this:

$query1->set('tax_query', $tax_query1  );

Hope that helps.