Can't edit array values in custom EditorWindow in 2021.3


I have simple EditorWindow which allows me to select one of ScriptableObjects and then draws default inspector for that ScriptableObject below. I wrote this long time ago and it used to work just fine but since Unity version 2021 i can’t edit values in arrays. I can add and remove elements but when i edit values inside it gets instantly reverted.

Here’s the code:

void OnGUI()
    GUILayout.Label("Select Configuration", EditorStyles.largeLabel);
    var configurations = LoadAll();
    var names = configurations.Select(c => GetTypeName(c)).ToArray();

    _selectedConfiguration = GUILayout.SelectionGrid(_selectedConfiguration, names, 5);


    var selectedObject = configurations[_selectedConfiguration];
    GUILayout.Label(GetTypeName(selectedObject) + " configuration", EditorStyles.largeLabel);

    if (selectedObject != null)
        var editor = Editor.CreateEditor(selectedObject);

        _scrollPosition = GUILayout.BeginScrollView(_scrollPosition);

Bug repoted
Issue Tracker