Ok, I have found a workaround. Answering here, to add the code I updated. I am not using the style attribute anymore, I am just adding a class if I need to hide a specific tab.
$tab_main = $_GET['tab'] === 'tab_main' ? '' : 'team-hide';
$tab_dest = $_GET['tab'] === 'tab_destination' ? '' : 'team-hide';
add_settings_section(
'team_section_main',
'',
'',
'team_searchbox',
array(
'before_section' => '<div class="tab-content '.$tab_main.'">',
'after_section' => '</div>'
)
);
add_settings_section(
'team_section_destination',
'',
'',
'team_searchbox',
array(
'before_section' => '<div class="tab-content '.$tab_dest.'">',
'after_section' => '</div>'
)
);
And then just using css on the team-hide
class.
This does the trick.