This usually happens when you specify "system" => "1" for the customer attributes. In order to make this working, you may create an upgrade script to set "system" => "0".
Here's an example:
app/code/YourVendor/YourModule/Setup/UpgradeData.php
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Customer\Setup\CustomerSetup;
use Magento\Customer\Model\Customer;
...
public function __construct(
CustomerSetupFactory $customerSetupFactory
) {
$this->customerSetupFactory = $customerSetupFactory;
}
...
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
if (version_compare($context->getVersion(), '0.2.0') < 0) {
$customerSetup = $this->customerSetupFactory->create();
$customerSetup->getEavConfig()
->getAttribute(Customer::ENTITY, 'example_attribute_code')
->setData('is_user_defined', 1)
->setData('system', 0)
->save();
}
}