You need to accumulate world transforms by traversing each item's .parentItem() chain and multiplying their transforms to compute the final world-space position.
.parentItem()