You can obtain this information by using the output "analysisInformation", which has a property called "Assignments". Hence, "analysisInformation.Assignments" contains the measurements/detections assigned to a track. The format of that field is:
The first column is a list of track IDs at the beginning of the step. The second column is the index of the detection that was assigned to this track. For instance, consider the following matrix:
This would mean that track 4 was assigned "detections(1)", and track 5 is assigned "detections(3)". Note that the function you are using -- "trackerGNN" -- assigns, at most, a single detection to any track. This is a hard assignment pattern. Other trackers behave differently, so their "analysisInformation" struct will have a slightly different format.