The default value reset when toggling the “With Unit” property is intended as the type is modified.
I have been able to reproduce the issue with the “Component Properties” modal being closed (not crashing) when modifying the Component. It has been added to our bug tracker.