My custom get_the_excerpt() can’t get excerpt by ID

Try this one

/* Change Excerpt length */
function excerpt($num, $post_id) { // removed empty default value
    $limit = $num+1;
    $excerpt = apply_filters('the_excerpt', get_post_field('post_excerpt', $post_id));
    $excerpt = explode(' ', $excerpt, $limit);
    array_pop($excerpt);
    $excerpt = implode(" ",$excerpt)."&#8230";
    echo $excerpt;
}

Another solution – using setup_postdata($post); and wp_reset_postdata();

function custom_get_the_excerpt($post_id) {
  global $post;
  $save_post = $post;
  $post = get_post($post_id);
  setup_postdata($post);
  $output = get_the_excerpt($post);
  wp_reset_postdata();
  $post = $save_post;
  return $output;
}