Hi Kiran,
The post
field loads posts via Ajax, and each call loads 10 posts by default. If you want to load all posts (so the Select All/None button work with all of them), please change the code to:
array(
'id' => $prefix . 'name',
'name' => esc_html__( 'All Names', 'text-domain' ),
'type' => 'post',
'multiple' => true,
'post_type' => array( 'names' ),
'select_all_none' => true,
'field_type' => 'select',
'query_args' => ['posts_per_page' => -1'],
'ajax' => false,
),