Not sure if that is a bug or an intended behavior, but this feels a bit weird.
The config schema for core.entity_view_display.*.*.* incorrectly lists a 'label' property, that doesn't actually exist on EntityViewDisplay objects.
As a result, core.entity_view_display.*.yml files contain a 'label: null' entry, meaning ConfigEntity::toArray() force-adds entries with a NULL value for properties found in the schema but not in the object.
It seems that this is only true for the top-level properties: for a mapping nested within an inner porperty, the schema might describe entries that are not always present, and those won't result in null entries added in the nested entry in the yaml (which is a good thing IMO ?).
The difference in behavior between top-level and nested mappings feels wrong ?