For all entities that are stored within storages, the OnItemAdded / OnItemRemoved calls update the GarbageManager to make sure child items are no longer tracked. However, for modded or future vanilla content where e.g. vehicle parts lay on the ground (like a tire) and are slotted onto the vehicle via a scripted action (SlotManagerComponent -> EntitySlotInfo::AttachEntity) there does not appear to be a mechanism that would remove them from the garbage collection and adds them back when they get detached. There is the EntitySlotInfo::OnAttachedEntity and EntitySlotInfo::OnDetachedEntity scripted event handler but it is not always implemented.
I am not sure where to best put the scripted logic for this to make sure it's always caught - or if this might need to be put on the c++ side for now.
Adding it into the script that does the attaching manually would lead to a lot of copy paste of the same thing, so it would be better if the action is triggered automatically.