Warren could resign in like September to give MA time to elect a replacement senator to start in January. Of course if Biden loses she threw her senate career away, but it's worth the risk.
Alternatively, the MA legislature could pass a law (over Baker's veto even) to force the replacement to be from the same party as the vacating seat holder. I think they changed the law before under similar circumstances. It would really just be best to require the replacement to be from the same party, then hold a special election later, and be done with this issue.