Section 343(4) in Bharatiya Nagarik Suraksha Sanhita, 2023
(4)Every person accepting a tender of pardon made under sub-section (1)-(a) shall be examined as a witness in the Court of the Magistrate taking cognizance of the offence and in the subsequent trial, if any;(b) shall, unless he is already on bail, be detained in custody until the termination of the trial.