That's an extremely difficult moral problem. It's akin to asking yourself if you would rather rescue the child on the left or the 3 people on the right when given the choice.
And then with various permutations for the child being yours or a stranger and/or the people on the right being your parents and / or strangers.
It is a tough moral problem, but one that societies of old have recognized and formalized. For example, most all religions have some formal structure where a person with a "higher calling" can take up a monkhood of some sort. Formal induction into monkhood made their severance from family ties public and contractual, much as the formal wedding ceremony publicizes a man-woman relationship.
We just don't have a socially accepted notion of "scientific monkhood" yet I suppose.
Well, the stereotype of the absent minded professor has existed for a long time now, as well as the hermit inventor/philosopher.
Perhaps not monkhood, but as an eccentric removing himself from society is a common occurrence.
And for sufficiently levels of ability and talent, people are willing to forgo social convention.
I forget who it was, but one of the great ones long gone was extremely uncomfortable around people. To the extent that people were told that they should casually walk up to him, and without addressing him directly, talk to the air about the problem they were facing or had come up with.
And then with various permutations for the child being yours or a stranger and/or the people on the right being your parents and / or strangers.
We are not well equipped to make such decisions.