had already goneExpresses that someone or something had already left or gone by a certain past time. しまう can also add a sense of finality or regret, but here it mainly emphasizes that the departure was already complete.
JA: 駅に着いたとき、電車はもう行ってしまっていた。
EN: When I got to the station, the train had already left.