Register `product_cat` taxonomy for default post post type

I’m not familiar with woocommerce, but in general, taxonomies are registered via the init hook with a priority of 1 or default priority which is 10

Your code is fine, so I suspect that your priority is wrong here. In short, you are trying to add the taxonomy to the post type before the taxonomy even exists. Try adding a priority of 11 or higher. This would ensure that the taxonomy is registered before you try to assign it to a specific post type