1 Thessalonians 4:17 says the manner we shall be with the Lord is via the resurrection. Therefore, there can be no literal "to be with the Lord" apart from resurrection. And therefore, Paul in 2 Corinthians cannot be saying he or anyone else will be "with the Lord" at death prior to the resurrection.
Paul is not describing an intermediate pre resurrection state in
2 Cor 5.