I can’t help you directly, but try typing
testPlane->GetMaterial(0).
testPlane->GetMaterial(0)->
And see what comes up on intellisense. There may be some values like ‘IsInstance’ or something that can help you differentiate.
Or you can possibly check a value that’s only present on instances, etc.
Maybe even store the first material to a static variable.
Then if the static variable exists, create all further instances from that.