Exclude product attributes from taxonomy terms loop

Product attribute taxonomies are prefixed with pa_, so you can check the taxonomy name for that prefix and skip it if it exists:

if ( substr( $taxonomy->name, 0, 3 ) === 'pa_' ) {
    continue;
}