Inserting custom elements into Woocommerce drop down list item

I have to customise the woocommerce dropdown list, but when i try to add <span> tags to the list item, it is not rendering as HTML and displaying as plain text.(i believe because it's sanitized) Tried to use wp_kses(), but in that case the <span> tags are missing from the DOM.

This is the li itself

<li class="select2-results__option select2-results__option--highlighted" id="select2-pa_size-result-dfnb-maxi" role="treeitem" aria-selected="false">Maxi £3.253.75 kg</li>

The code below where i try to customise the drop down li tag.

foreach($variation['attributes'] as $key => $slug) {
        if("attribute_" == mb_substr( $key, 0, 10 )){
            $taxonomy = mb_substr( $key, 10 ) ;
            $attribute = get_term_by('slug', $slug, $taxonomy);             
            if($attribute->name == $term){
                $term =  wp_kses('<span>' . $term . '</span> <span class="price">' . wc_price($variation['display_price']) . '</span><span class="weight">' . $variation['weight_html'] ."</span>", array());               

Thanks for your help.