Why ConfigFormBase does not goes through custom construct() when using managed_file?
The difference could be that managed_file is using Ajax which is caching the form object.
If you want to have this property cached you would need to declare it as protected property:
class CustomForm extends ConfigFormBase {

  protected $config;

Normally $this-&gt;config() is the method FormBase::config as the main entry point to the config API, not a property you populate when constructing the form object. Using the same name could be quite confusing and it's also recommended to use the mentioned method to retrieve the config and declare the config in ConfigFormBase::getEditableConfigNames() if you intend to save it.