What might solve your problem is if there are two resurrections. Here's my understanding of the resurrection:
1) First resurrection: The first resurrection, also referred to as the “earlier resurrection” (cf. Phil. 3:10, 11 Roth), is an important chronological marker (1 Cor. 15:51-53; 1 Thes. 4:15-17; Rev. 6:11; 11:1, 14, 15, 18; 20:4-6). It will be initiated in the time of the seventh and last trumpet (Rev. 11:15, 18). Next in line are the two witnesses who are publically resurrected (Rev. 9:11; 11:3, 11, 12). Last group is to be caught up in the air during Jesus’ Second Coming. They will have no advantage over those resurrected earlier. Although the time frame for their ascent will differ, they will receive the same reward (Matt. 24:29-31; 1 Thes. 4:15-17 CSBO).
2) Second resurrection: This is to take place during the Millennium (Dan. 12:13;
John 5:28, 29; Acts 24:15; Rev. 20:11-14). Rev. 20:5a is out of place here and
appears to be a later insertion. The verse is omitted by various MSS (NA28
Apparatus). Jesus referred to judgment and resurrection “in the last day.” This must refer to the Millennium, which forms part
of the Lord’s Day (John 6:44; 12:48; 2 Cor. 15:23-28; Rev. 1:10; cf. 2 Pet.
3:8).