EditorGUI.EndChangeCheck() doesn't fire when Undo

for some reason undo doesn’t make EditorGUI.EndChangeCheck() fire
this is my code

        if (quadOnSphere.tourShape != QuadOnSphere.TourShape.SixSides)
        {
            //serializedObject.Update();
            EditorGUILayout.BeginHorizontal();
            EditorGUI.BeginChangeCheck();
           
            TourTexture.objectReferenceValue = (Cubemap)EditorGUILayout.ObjectField(TourTexture.objectReferenceValue, typeof(Cubemap), false);
 
            if (EditorGUI.EndChangeCheck())
            {
                serializedObject.ApplyModifiedProperties();
                quadOnSphere.ApplyTextureToMesh();
                EditorUtility.SetDirty(quadOnSphere);
            }
            
            EditorGUILayout.EndHorizontal();
        }

please help