Serialization of derived UserData class with generics

I was trying to create a derived class from UserData that wrapped a generic type. It looks like it can serialize it, but it’s unable to deserialize. When saving the document, it calls the Write method, but when opening it back, it never calls the Read method. If I remove the generic it does serialize/deserialize as expected. Below is the code I’m using:

    public class AttributeData<T> : UserData where T : Attribute, new()
{
    public T Attribute { get; private set; }

    public AttributeData()
    {
        Attribute = new T();
    }

    protected override bool Write(BinaryArchiveWriter archive)
    {
        archive.Write3dmChunkVersion(1, 0);
        var bytes = Attribute.SerializeToBytes();
        archive.WriteByteArray(bytes);

        return true;
    }

    protected override bool Read(BinaryArchiveReader archive)
    {
        archive.Read3dmChunkVersion(out int major, out int minor);
        if (major == 1 && minor == 0)
        {
            var bytes = archive.ReadByteArray();

            Attribute = bytes == null ?
              new T() : bytes.DeserializeFromBytes<T>();
        }

        return true;
    }
}

Bumping this up, although not urgent as I switched to a different pattern using inheritance rather than generics.