A prosecutor doesn’t just offer it and then assume the witness will tell the truth. Everything is verified before there is testimony.
If the witness lies, while on the stand, they lose immunity and get charged with perjury.
But who will protect her from the mob?