This is a very famous verse precisely because it appears to contradict Paul’s other teaching on death, sleep in the dust, and a future resurrection at the return of Christ.
19 for I know that through your prayers and the help of the Spirit of Jesus Christ this will turn out for my deliverance, 20 as it is my eager expectation and hope that I will not be at all ashamed, but that with full courage now as always Christ will be honoured in my body, whether by life or by death. 21For to me to live is Christ, and to die is gain. 22 If I am to live in the flesh, that means fruitful labour for me. Yet which I shall choose I cannot tell. 23 I am hard pressed between the two. My desire is to depart and be with Christ, for that is far better. 24 But to remain in the flesh is more necessary on your account. 25 Convinced of this, I know that I will remain and continue with you all, for your progress and joy in the faith, 26 so that in me you may have ample cause to glory in Christ Jesus, because of my coming to you again. (Philippians 1:19-26 ESV)
Even N.T. Wright, one of the most consistent and public Anglican advocates of the teaching characterised as “soul sleep” by many Calvinists, has to admit in his commentary on Philippians that “to depart and be with Christ” sounds like the opposite of the Bible teaching of the death state found so clearly in the Old Testament in verses such as Ecclesiastes 9:5 “the dead know nothing”.
This is also one of the most confident statements of a Paul who repeatedly reminded his readers that even he could unsave himself, where Paul counts death as assured to “be with Christ”. Perhaps the key here is the context of the chapter – writing from prison, with the Imperial Guard, where in 25 he is able to state that the worst is (not yet) going to happen, that he will live, and for a time remain and continue with you all. Seen from this perspective it is a simple either/or. Either Paul dies, his name written in the Book of Life, and his next waking moment at the resurrection with Christ, or Paul does not depart and stays “with them” – although perhaps not actually able to travel to revisit them. Seen in this crisp life/death, present/absent choice, the language “depart and be with Christ” is not teaching a soul going to heaven, but a telescoped view through the the ultimate being with Christ, at the resurrection.