I registered so that I could disagree with most answers here, because I really think there's a perspective that's lacking.
Let me preface this by saying that I am 4th-year postdoc who moved away from her home country (Germany) and committed partner in 2013 to pursue a Master's degree (followed by a PhD) in the UK.
I am still together with that same person and we've been happily married since 2017, even though we have not lived in the same country since 2013 (apart from 10 months during the Covid pandemic).
My current postdoc is in the US and I was previously a visiting PhD student in Canada, so I am well-versed in transatlantic long-distance relationships.
Do I sometimes miss my partner and wish we got to spend more time together? Yes, sure. Do I regret any of my time abroad? Absolutely not.
In fact, I love being able to switch between my life in a new country (the US is the 5th country I have lived in since first moving abroad) and returning to our apartment in Germany, where my partner still lives in the city where we both started studying. I love showing off my new home to him when he visits, and I love returning to the old one.
Now, I am aware that this is not for everyone, but I really want to put out this perspective. It is by no means impossible -- and not even all that improbable. My social circle is full of people who were apart during their PhD or a postdoc and are still happily together.
About the academic choice: People above have correctly written that whether your department is 1st or 5th in the world is completely immaterial, what counts is your advisor and the working environment. (Let me say this as someone who had a very famous on-paper advisor who was not a good fit subject-wise and who she never ended up working with.)
What you have written in your OP sounds like the advisor at A is the much better fit, so that is what anyone making the academic argument should focus on in my view. Yes, it is important that you also have a good social live during your PhD, but you can have that if you move abroad. Making friends during a PhD is very easy. Do not do a PhD with someone whose research topic does not fit your interests and who won't supervise you properly (which is what option B sounds like from what you've written). That way misery lies.
Quite apart from the long-distance issue, I think that moving university for your PhD is generally a good thing to get a broader perspective of your field. Sure, you don't have to, but I have found experiencing different academic environments very enriching.
Edit: Let me add that if you give up what you describe as your "dream advisor" for your current partner, there's a danger that whenever something doesn't go well during your PhD at choice B (and things will go badly at times), you end up resenting your partner for it. That's toxic to any relationship and can just as easily doom it as being long-distance might.