Well, I was wrong. The rogue does just about the same with archery--worse in the first couple of levels, slightly better from level 3 onward. Here's what it looks like with archery:
Level 1: +34%
Level 2: +34%
Level 3: +25%
Level 4: +22%
Level 5: -22%
Level 6: -34%
Level 7: -29%
Level 8-10: -15%
Level 11-13: -34%
Level 14-16: -24%
Level 17-19: -14%
Level 20: -28%
10-level average: 89%
20-level average: 80%
A little more about how I figured the numbers: I assume a 70% base chance to hit the monster at every level (but see below). The archer fighter gets a 5% accuracy boost due to Archery Style. Melee fighters get Great Weapon Style's damage-on-a-miss instead, which turns out to be a heck of a lot better than 5% accuracy.
(Slight adjustment to my previous numbers: I neglected to adjust for the fighter's accuracy advantage at level 6, when fighters get their second ability score boost one level ahead of rogues. The level 6 number for melee should be -34% instead of -32%.)
Now, there are a few things I didn't factor in, and they do favor the fighter. A first-round crit with max sneak attack damage is excellent, but a full round of extra attacks seems to be slightly better; Action Surge beats Assassinate. As you point out, magic weapons also tend to increase the fighter's lead. I just ran the numbers assuming +1 weapons from level 6, +2 weapons from level 11, and +3 weapons from level 16. The 10-level averages become 82% melee/86% archer, and the 20-level averages become 66% melee/69% archer. However, magic weapons are extremely campaign-specific; I'm not at all sure these are good assumptions, so I'm leaving them out of the baseline. Finally, fighters spread their damage out over a series of attacks while rogues do it all in one big burst. That means rogues will on average lose more damage to "blow-through."
Google spreadsheet link: https://docs.google.com/spreadsheets/d/18VvHy8Q_lUr5e-mZqvqfsr4_STocWnv_l3scgXd_mlM/edit?usp=sharing
Level 1: +34%
Level 2: +34%
Level 3: +25%
Level 4: +22%
Level 5: -22%
Level 6: -34%
Level 7: -29%
Level 8-10: -15%
Level 11-13: -34%
Level 14-16: -24%
Level 17-19: -14%
Level 20: -28%
10-level average: 89%
20-level average: 80%
A little more about how I figured the numbers: I assume a 70% base chance to hit the monster at every level (but see below). The archer fighter gets a 5% accuracy boost due to Archery Style. Melee fighters get Great Weapon Style's damage-on-a-miss instead, which turns out to be a heck of a lot better than 5% accuracy.
(Slight adjustment to my previous numbers: I neglected to adjust for the fighter's accuracy advantage at level 6, when fighters get their second ability score boost one level ahead of rogues. The level 6 number for melee should be -34% instead of -32%.)
Now, there are a few things I didn't factor in, and they do favor the fighter. A first-round crit with max sneak attack damage is excellent, but a full round of extra attacks seems to be slightly better; Action Surge beats Assassinate. As you point out, magic weapons also tend to increase the fighter's lead. I just ran the numbers assuming +1 weapons from level 6, +2 weapons from level 11, and +3 weapons from level 16. The 10-level averages become 82% melee/86% archer, and the 20-level averages become 66% melee/69% archer. However, magic weapons are extremely campaign-specific; I'm not at all sure these are good assumptions, so I'm leaving them out of the baseline. Finally, fighters spread their damage out over a series of attacks while rogues do it all in one big burst. That means rogues will on average lose more damage to "blow-through."
Google spreadsheet link: https://docs.google.com/spreadsheets/d/18VvHy8Q_lUr5e-mZqvqfsr4_STocWnv_l3scgXd_mlM/edit?usp=sharing