The chronological order of Dziady is 2-4-3-1. Since Gustaw is dead(?)(he's a phantom at the very least) in parts 2 and 4, he's also dead in part 3. In part 4 he's described to look like a scarecrow, he stabs himself in the chest, in part 2 he is immediately recognised as dead, pale as snow, with a visible scar leading from his chest down, a wild stare, in Upiór(a poem that leads into parts 2 and 4) he has a bloodied, cold, almost ripped apart chest, cold mouth, he is visibly dead.
And then, in part 3, he is in prison. Basically no mention of anything that had happened. He's just a guy, an odd one, very talented, a special guy but a guy nonetheless.
Imagine he is dead. He is sitting there, in that cell, with chest bleeding and his heart hasn't beaten in 4 years, he looks dead, even worse than it would be usually since in Upiór he is mentioned to only be leaving his grave occasionally, for Zaduszki, and he can't go back, he is in prison.
Imagine how flabbergasted he is at how no one seems to notice he is dead.
How did they even arrest him? Not talking about for what because the Tzar doesn't need that but how. When?
If we go by the order, we first have a phantom who doesn't speak, he just hangs there in the chapel, then we have Gustaw showing up in the priest's house at night randomly and stabbing himself, and then he is in prison being possessed by demons. The chapel and the priest's house are near where he used to live since both the priest and a girl at the chapel recognise him+ he is mentioned in Upiór to wander his homecountry (rodzinne strony dk how else to translate it). And then he is in Vilnius, in prison.
Idk man, Dziady are fascinating. I kinda wish Mickiewicz was alive so that I could ask him.