First of all, I doubt there is harm in having these URLS – each product page has (should have) canonical url which points to the short form of the product url, so this should not produce any extra indexed pages.
Indeed, having these parameters in the product URL helps Shopify engine to see which of the recommended products are more relevant, helps refine its recommendations based on actual customers selections.
Anyway, the code in step 3 of the tutorial forms URL to fetch the product recommendations section and then uses it to fetch the actual HTML and “paste” it into product page. Changing it would not change the product URLs.
The actual rendering of recommended products is performed by liquid code in step 1 – it basically calls your product-card-grid snippet, same snippet used to output product cards on collection pages:
{% for product in recommendations.products %}
- {% include 'product-card-grid', max_height: 250 %}
{% endfor %}
So, if you still really want to remove those URL parameters, I’d go into product-card-grid snippet code, find something similar to
href="{{ product.url }}"
and replace it with
href="{{ product.url | split: "?" | first }}"
Your theme may use different snippet name, but the idea is the same.