Change slug for an already registered post type


function wpti_custom_post_type_args( $args, $post_type ) {
if ( $post_type === 'my-registered-custom-post-type' ) {
$args['rewrite'] = array(
'slug' => 'my-new-slug'
);
}

return $args;
}

Unfortuantely it doesn’t work with the default post types like post/page