In this simplified example, the following setup will allow for a curve endpoint to have its position set to the nearest point of a cube from the same instancer point:
However, should the cubes be moved/scaled so that another cube's points are closer, those points are naturally used by the "Geometry Proximity" node, producing the undesirable result where the two curves on the left are not connected to the cubes that share their instancer point:
Because the actual application of this setup is using multiple instances with a vareity of point counts, the "Geometry Proximity" node would be ideal should the limitation of only using matching instancer index values be possible. Any help would be greatly appreciated.
Edit to show a scaling example for clarity:
Should all or any selection of instances be scaled past a certain point, the setup won't work:
Likewise, if after being realized the instances are edited past a certain point the setup wont work: