Zend certified PHP/Magento developer

How to add multiselect filterable to Custom product attribute magento 2.3?

public function addTestCustomAttributes(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            MagentoCatalogModelProduct::ENTITY,
            'test_courses',
            [
                'type'                    => 'varchar',
                'backend'                 => 'MagentoEavModelEntityAttributeBackendArrayBackend',
                'frontend'                => '',
                'label'                   => 'Select the Course',
                'note'                    => '',
                'input'                   => 'multiselect',
                'frontend_class'          => '',
                'source'                  => TestCourseModelConfigSourceGroupMultiselect::class,
                'global'                  => MagentoEavModelEntityAttributeScopedAttributeInterface::SCOPE_STORE,
                'visible'                 => true,
                'required'                => false,
                'user_defined'            => true,
                'default'                 => '',
                'searchable'              => true,
                'filterable'              => true,
                'comparable'              => false,
                'visible_on_front'        => false,
                'used_in_product_listing' => true,
                'unique'                  => false,
                'apply_to'                => '',
                'is_used_in_grid'         => true,
                'is_visible_in_grid'      => true,
                'is_filterable_in_grid'   => true,
                'group'                   => 'Test Course'
            ]
        );
}

My output for custom multiselect attribute with search filter

enter image description here

Exactly i expected output

enter image description here

Need Help 🙂