By default the boolean fields' value displayed as 0/1 when user filled the checkbox field under custom configuration form. Need to render True/False instead of 0/1.
$form['newfield'][$id]['required'] = array(
'#type' => 'checkbox',
'#default_value' => ($config[$id]['required'] ? $config[$id]['required'] : $field['required_disabled']),
'#disabled' => $field['required_disabled'],
);
public function submitForm(array & $form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$config = $this - > config($this - > configId);
$fields = static::getFields();
$values = $form_state - > getValues();
$values = $values['newfield'];
foreach($values as $key => $field) {
$config_values[$key] = array('visible' => $field['visible'], 'required' => $field['required'], );
}
}