You can also modify the shortcode to return a single string, the following should work as well:
function wporg_shortcodes_init(){
function wporg_shortcode($atts = []) {
extract( shortcode_atts( array(
'term' => 'columns'
), $atts ) );
$custom_taxonomy = $atts['term'];
$output = '';
// add query of custom post type board_members
$recentPosts = new WP_Query
(array('posts_per_page' => -1, 'post_type' => array('board_members'), 'columns' => $custom_taxonomy ));
while( $recentPosts->have_posts() ) : $recentPosts->the_post();
$output .= '<div class="b-thumb">'.the_post_thumbnail('thumbnail').'</div>';
$output .= '<p class="b-info">';
$output .= '<span class="b-name">'.the_title().'</span><br />';
$output .= '<span class="b-country">'.the_field('country').'</span><br />';
$output .= '<span class="b-position">'.the_field('position').'</span><br />';
$output .= '<span class="b-content">'.printf(get_the_content()).'</span><br />';
$output .= '</p> ';
endwhile;
wp_reset_postdata();
return $output;
}
add_shortcode('board-members', 'wporg_shortcode');
}
add_action('init', 'wporg_shortcodes_init');