Remove taxonomies using register_post_type_args

The theme I’m using is adding taxonomies to CPT using register_post_type and 'taxonomies' => array('portfolio-cat') as one of the arguments.

I need to remove that particular taxonomy using register_post_type_args.

I have tried with:

add_filter( 'register_post_type_args', 'change_portfolio_post_type_args', 10, 2 ); function change_portfolio_post_type_args( $  args, $  post_type ) {     if ( 'portfolio' === $  post_type ) {         unset($  args['taxonomies']); // Not working         unset($  args['taxonomies'][0]); // Not working         $  args['taxonomies'] = array(); // Not working         $  args['taxonomies'] = array('category'); // It justs add another taxonomy     }     return $  args; } 

How can I remove it, without touching theme core files?