How to add a custom tab in the main course navigation bar, not in the “More” menu?

I am developing a block plugin for Moodle, and I want to add a custom tab to the main course navigation bar (directly visible, not hidden under the “More” menu). Currently, my code adds the tab to the “More” menu. Here’s what I have so far:

$context = context_course::instance($COURSE->id);
$coursenode = $PAGE->settingsnav->find('courseadmin', navigation_node::TYPE_COURSE);

if ($coursenode) {
    $node = navigation_node::create(
        get_string('myblock', 'block_myblock'),
        new moodle_url('/blocks/myblock/view.php', ['courseid' => $COURSE->id]),
        navigation_node::TYPE_SETTING,
        null,
        'customnode',
        new pix_icon('i/settings', '')
    );

    $node->showinflatnavigation = true;
    $node->forceintomoremenu = false;
    $node->showinsecondarynavigation = true;
    $node->display = true;

    $coursenode->add_node($node, 'filtermanagement');
    $node->make_active();
    $node->force_open();
}

The tab is currently added under the “More” menu instead of being directly visible in the course navigation bar.

How can I ensure that my custom tab appears directly in the main course navigation bar and not under “More”?