Is there a way to keep variables with interface types from resetting when assemblies reload ?

Hello everyone, I need some help in unity custom editors, so I am creating a map editor for a 2D game. I made a EditorToolbar class for toolbar that is an extension the GUI.Toolbar(...) function by holding the items list and showing the toolbar with the ShowToolbar() function and it is intended for general purpose:

[System.Serializable]
public class EditorToolbar {
    public List<IEditorToolbarItem> items;

    public EditorToolbar() {
        items = new List<IEditorToolbarItem>();
    }

    public void AddToolbarItem(IEditorToolbarItem item) { ... }
    public void ShowToolbar() { ... }
}

where IEditorToolbarItem is an interface that has a UseItem() function, I want the editor to not clear the items list when the the assemblies reload (entering playmode or changing code). When I looked in net, it talks about serialized objects and fields, since it is not possible to serialize interfaces, I tried to make them as a class but after that the items list only holds reference to the basic class and empty UseItem() function instead of the inherited classes one. I can’t find a way to fix that, so can anyone clarify me what should I do to fix the problem ?

So the solution that I think satisfies my problem is to add a SerializeField and a SerializeReference attribute just like this:

public class EditorToolbar {
    [SerializeField, SerializeReference]
    public List<IEditorToolbarItem> items; 
    ...
}

From what I could understand, the Listclass keeps a references of the IEditorToolbarItem items added to the list, and by putting SerializeReference attribute unity serializes the references and rebuilds the items using the references after reloading the assemblies instead of the data of the class. and for SerializeField I think it is to make sure that the items list variable is serialized too. If anyone have a deeper explanation, some mistake to point to or a better way to make this I will be glad to know it.