Merely because the confession was retracted later, it does not mean that the confession was not voluntary in nature. The issue as to whether the accused was willing to give confession voluntarily or not is to be determined from his mental state at the time when he gave the confession. If the confessional statement has been amply corroborated by circumstantial evidence, its subsequent retraction by the maker would not make it unreliable.
Abdulvahab Abdulmajid Shaikh v. State of Gujrath (2007) 4 SCC 257
Henry Westmuller Roberts v. State of Assam (1985) 3 SCC 291 = AIR 1985 SC 823
It all depends on the circumstances under which Confession was given and also depends on the circumstances under which it gets retracted later. To understand, a Confession sometimes can also be under some undue influence which may get retracted later because of obvious reasons.