Shadowheart might not be very original, but neither are Amiri and Jaethal. It doesn't mean she is badly written. I'm surprised you didn't mention Octavia, a companion who was actually kind original for an RPG (but that doesn't mean she was well written)
This.
In fact, Amiri was terrible, easily the worst companion next to Linzi, and Jaethal had potential but was underdrawn. Though I wouldn't necessarily call "flirty free spirit" all that original either.
To be fair though, originality does not really matter in terms of making a character compelling. It's all in the execution.
And while there are things BG3 could learn from PF:KM, I would not say how to make good companions is among those. The companions in that game were very hit-or-miss and also suffered from the lackluster translation from Russian to English in some cases.