First item in inspector list is incorrect height

I created a custom property drawer like so:

using UnityEditor;
using UnityEngine;

[CustomPropertyDrawer(typeof(DialogLine))]
public class DialogLinePropertyDrawer : PropertyDrawer
{
    private const int Padding = 5;
    
    
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        // Calculate reusable values
        var start = position.x;
        var top = position.y;
        var half = position.width / 2.0f;
        var line = EditorGUIUtility.singleLineHeight;
        
        
        // Draw fields - pass GUIContent.none to each so they are drawn without labels
        var speakerRect = new Rect(start, top, half, line);
        EditorGUI.PropertyField(speakerRect, property.FindPropertyRelative("speaker"), GUIContent.none);

        var clipRect = new Rect(start + half, top, half, line);
        EditorGUI.PropertyField(clipRect, property.FindPropertyRelative("clip"), GUIContent.none);

        var emotionRect = new Rect(start, top + line + Padding, half, line);
        EditorGUI.PropertyField(emotionRect, property.FindPropertyRelative("emotion"), GUIContent.none);

        var positionRect = new Rect(start + half, top + line + Padding, half, line);
        EditorGUI.PropertyField(positionRect, property.FindPropertyRelative("position"), GUIContent.none);

        var textRect = new Rect(start, top + (line + Padding) * 2, position.width, line * 2);
        EditorGUI.PropertyField(textRect, property.FindPropertyRelative("text"), GUIContent.none);

    }
    
    public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
    {
        return EditorGUIUtility.singleLineHeight * 4 + Padding * 4;
    }
}

It works as expected, except the first item in a list of that type always displays with the incorrect height. (See the image below and how the first item renders partially behind the second one.)

195826-screenshot.png

Is there something wrong with my code or a workaround I can use to fix this?

Hi @pennomi

Do you found the solution ?

I have the same problem, but I guess that this bug is new since i updated my version of unity… what version of unity you used?