WooCommerce pass URL Product attributes for Variants

Hello everyone, I’m confused about how I can pass variants via the URL attributes in Bricks.

Until now this was always possible using my-awesome-product/?attributes_name=something
However, I noticed in Bricks that I can’t change the variant in the shopping cart either.

If I switch back to another theme e.g. Storfront or Blocksy or Elementor hello, then I have this function.
Now I’m somehow unsure whether this should be a native function or a theme function.

Example with Blocksy: Kerzenständer Stern - Imkerei Purin
If I click on the product title in the shopping cart, I will also be redirected to this variant.

any idea, how i can solve this with bricks?

ok some work arround - but it works

jQuery(document).ready(function($) {
    $(document).on('updated_wc_div', function() {
        setTimeout(function() { 
            function getAttributeParams() {
                const params = new Map();
                const urlParams = new URLSearchParams(window.location.search);
                for (const [key, value] of urlParams) {
                    if (key.startsWith('attribute_')) {
                        params.set(key, value);
                    }
                }
                return params;
            }

            const attributes = getAttributeParams();

            attributes.forEach((value, key) => {
                const selector = `select[name="${key}"]`;
                const attributeSelect = $(selector);
                if (attributeSelect.length) {
                    attributeSelect.val(value).change();
                }
            });
        }, 500);
    });
});