Penso che il problema sia che il tuo ::has() il metodo sta cercando prodotti con esattamente 5 taglie diverse su ogni prodotto specifico, il che presuppone che tu stia utilizzando $this->hasMany('Size') nel tuo modello di prodotto. Dove come ::where() il metodo restituisce risultati in cui la dimensione del prodotto è 5.
Nella documentazione usano un esempio di commenti. Un post avrà un elenco di commenti. Puoi trovare post che hanno almeno un commento (es. Post::has('comments')->get() ) oppure puoi trovare post con più di 3 commenti (es. Post::has('comments', '>=', '3')->get() ).
https://laravel.com/docs/eloquent#querying-relations