Yes it works well now. I can select categories for the archive page.
I had to remove the “products” class in the $shortcode_output so that it wouldn’t interfere with infinite scrolling plugins that rely on the products class in, the shop loop section, to load more products.
Thank you for your timely help!