Basically, there's no way you're getting rid of Shadowheart short of killing her; they hard roadblock you from progressing into the goblin camp without the artefact, no matter what you do before, and they desu-ex-machina an answer to it when you get there.

If shadow heart is in your party, and you've recruited her already, but deliberately left her behind in camp, then the artefact magically teleports to you to do its thing - because apparently you're so special that it will bend the laws of time and space to warp over and protect you from the absolute exerting her will on you (but doesn't do this for all the many other people that have been similarly dominated by her).

If Shadowheart is NOT recruited, and you've carefully avoided every flag where she tries to forcibly add herself to your party - she shows up out of nowhere here, 'catching up to you' in a similar deus-ex-machina way, to protect you with the artefact by extreme convenient coincidence.

If Shadowheart is recruited and also dead, the artefact teleports to you, as in the first case.

If Shadowheart is not recruited and dead, and you looted her, then the artefact already bound itself to you.

If Shadowheart is not recruited, dead, and you deliberately did not interact with her body, the the artefact teleports to you, as in the first case.

In either situation, the artefact either binds itself to you permanently, or, is Shadowheart is present, she joins your party, and you cannot send her away or deny her joining you short of killing her.