Why template_include filter does not work with WPML plugin?

Hi everyone I have found the solution. I think the comment of the @JacobPeattie help me to do that. Thank you @JacobPeattie! And here is the solution: in my code I use if statement for chacking what product category is:

if ( is_singular('product') && (has_term( 'cosmetics', 'product_cat')) )

But I did not take into account the fact that the WPML changes the category for the extra language. That’s my fault. Now I will know that. And here is the correct code:

add_filter( 'template_include', 'alexandra_template_include', 15, 1 );
function alexandra_template_include( $template ) {
global $post;
$terms = wp_get_post_terms( $post->ID, 'product_cat' );
foreach ( $terms as $term ) $categories[] = $term->slug;

if(is_product() &&  in_array( 'cosmetics', $categories) || in_array( 'cosmetics- 
en', $categories)){
    $template = get_stylesheet_directory() . '/woocommerce/single-product- 
cosmetics.php';
 }
   return $template;
  }

I need it for specific purposes. But maybe it will be useful for someone else.