The answer to this appearing in the fifth verse (91) came from Allah Almighty Himself. It says:
آلْآنَ وَقَدْ عَصَيْتَ قَبْلُ وَكُنتَ مِنَ الْمُفْسِدِينَ ﴿91﴾
Is it now [ that you come to believe ] while you were rebellious before and you were among the mischief-makers?
This proves that the profession of faith exactly at the time of death is not legally trustworthy. It is further clarified by the Hadith in which the Holy Prophet ﷺ said, 'Allah Ta'ala keeps accepting the Taubah (repentance) of a servant until comes the time of the ghargharah of death. (Tirmidhi)
The ghargharah of death means the time the soul or spirit is drawn out or extracted from the body and it is a time when angels appear face to face. At that time, life in this world, the home of deeds, is all over and the laws of the Hereafter come into force. Therefore, nothing done at that time is acceptable, neither belief, nor disbelief. Whoever believes at such a time will not be called a believer. He will not be treated as a believer while shrouding and burying him. This stands proved from the fate of Pharaoh. There is a consensus that he died a disbeliever. This is also what the text of the Qur'an says. In case, someone is reported to have called the belief of the Pharaoh as valid, it will either be suitably interpreted, otherwise the statement would be considered false. (Ruh al-Ma` ani)
Similarly, if someone were to utter (God forbid) a word of disbelief (kufr) in a state when the soul is being drawn out of the body, he will not be called a kafir (disbeliever). Instead, a Salah of Janazah (Muslim funeral prayers) will be offered for him and he would be buried like Muslims, and the word of disbelief uttered by him would be interpreted (in his favor). This finds confirmation in what happened in the case of some Auliya' of Allah, specially when that which they uttered bothered people as if what they were uttering was nothing short of kufr (disbelief). However, when they became conscious and explained, it gave relief to everyone and they realized that it was nothing but a declaration of true belief.
In short, when the soul is being drawn out and the certain knock of death is on, that time is not counted in the life one lives in this world. Nothing done at that time is valid in terms of the Shari'ah. However, everything is, if done before that. But, those who see this transition from one world to the other have to be very cautious. It is possible to make a mistake in determining the correct situation. Is this the time of the drawing of the soul from the body (naz'atu'r-ruh)? Or, is it the last rattle of death (ghargharatu 'l-maut)? Or, is it that which prevails earlier (usually referred to in English as being in the throes of death or the agony of death or, uncharitably enough, giving up the ghost)?