WooCommerce hide unexisting variations

We found it ourselves, this is the solution.
Add the following snippet in functions.php

function wc_increase_variation_threshold( $product ) {
    return 500;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'wc_increase_variation_threshold', 10, 2 );