No straight answer
Sadly this is one of those questions that the best answer is probably depends.
Before you accept, decline, etc you need to decide your priorities and act based on those. I Highly recommend every one working person, stay at home parent, retired people, etc. Take a day or two every few months to stop and sort out what's important to them short and long term, and of those things order them from most to least important. When you face a hard choice like the one mentioned you consult the list, of the choices which best covers your highest priorities?
Choose based an the data, not the heart
When dealing with life matters it's very easy to take a knee jerk or emotional approach to choices, which results in a mixed bag of results, some unavoidable, some completely avoidable. You need to use what data you can collect, compare it against your priorities, and make an informed choice.
In this case you're data is salary, cost of relocation, respective cost of living, your list of priorities, and anything those companies and locations offer toward that list.
Always plan to move forward, but have a plan B
Right now you're involved in a collaboration you really don't want to leave... does this collaboration have a future with you? or is this something you want to do that once it's done, it's done? Is staying a benefit or a detriment to your priorities? If you leave the collaboration early will you be welcome back if things don't work out? Will staying potentially stall your career?
You need to consider all these things, and you need to decide what you're willing to risk, and what you're not willing to risk.
What can you do?
Really there are only a few routes and there likely results...
- Take the new Job. You get the new job and walk away from the collaboration. Possibly a bridge is burned, maybe not. You are taking the route most likely to benefit your career and financial well being, with a lot of unknowns to be dealt with.
- You reject the new job on good terms and offer to reapply later. (or similar) You stick to being part of a collaboration you enjoy benefiting your peace of mind and likely keeping your stress a bit lower than going through the transition of a new job with relocation. It's possible this could stall your career and cost you an excellent opportunity, but there will be others.
- You ask for a significantly later start time. It's not unheard of but 3 - 6 months isn't likely unless we're talking way up the company ladder like CTO or CFO, and even then it's rare. You can explain your involved in a project you'd prefer not walk away from, likely though this simply means you'll not get the job, they might also not take you seriously the next time you apply.
- You take the job and try to come up with some way to still be involved with the collaboration remotely. This could be the best of both worlds, or completely unrealistic borderline impossible depending on the nature of the collaboration, the outcome of which depends heavily on details we don't have.
What I would do?
Sadly there are just too many details missing for me to even say... It would likely be split between taking the offer, or turning it down and trying again later.
Good luck, just keep focus on your goals and what benefits them or works against them, decide accordingly.