So is McCarthy timing this to intentionally screw the GOP? With Santos out too, their majority is very slim.
If he stays in, the GOP has an 8 seat majority. Thus if 4 of them vote with Democrats, there is a 217 R - 217 D tie and the bill fails. If McCarthy leaves, the GOP has a 7 seat majority. Thus if 4 of them vote with Democrats, there is a 216 R - 217 D vote and the bill fails. Essentially, McCarthy leaving does nothing to screw the GOP at least in the short term until Santos is replaced.
But if McCarthy instead sided with the Democrats on a couple key votes, then the GOP could only lose
2 others if they want to pass a bill (because they'd have a 6 seat majority and losing 3 votes means a 217-217 tie and the bill fails). THAT would screw the GOP much more than quitting. But it would also screw McCarthy's post-house career.
Conclusion: McCarthy is saving himself and not intentionally screwing the GOP.