Praise be to Allah, and peace and blessings be upon the Messenger of Allah. To proceed:
There is no evidence established in the Qur’an or authentic Sunnah proving that a dying person sees his deceased relatives. Therefore, it is not correct to assert this with certainty, because matters of the unseen can only be established through revelation.
There is a report attributed to Yazid ibn Shajarah رضي الله عنه stating that, at the time of his death, a deceased person may be shown his companions according to what he had been engaged in, whether righteousness or amusement. However, this does not indicate that his deceased relatives are actually present. Likewise, what some dying people say about their fathers, mothers, or other relatives may be caused by the severity of the death agony or by imagination. It does not necessarily mean that they have truly encountered their souls.
It is also established in general that a dying person may see some matters of the unseen, including seeing the angels. Allah تعالى says:
﴿Indeed, those who have said, “Our Lord is Allah,” and then remained steadfast, the angels descend upon them, saying, “Do not fear and do not grieve, but receive the good news of Paradise.”﴾ [Fussilat: 30].
Scholars have mentioned that the angels descend upon the believing person at the time of death and give him glad tidings. Signs may appear on him indicating that he sees them, but one should not assert details for which there is no established textual evidence.
Therefore, a dying person's calling out to one of his deceased relatives is not sufficient to establish that he sees that person, nor does it by itself indicate a good or bad ending.
The obligation is to adhere to what has been established in Islamic law, to believe in what Allah and His Messenger ﷺ have informed us about the conditions of the agony of death, and to refrain from delving into unseen details for which there is no evidence.
And Allah تعالى knows best.