Sophia doesn't even have the excuse of "I can't remember what happened when I lose control". What the law cares about is "is she capable of understanding Right from Wrong". And the answer is yes, she is capable of doing so. She's well aware of the fact that what she's doing is wrong, and that she'd get in trouble for it if discovered. Her bullshit "predator/prey" belief gives her justification for doing thigns she knows are wrong and illegal, but she is mentally competent enough to know right from wrong. She might need psychiatric help, but her issues don't remove her culpability. Hell, from the last interlude of this story it sounds like she still has her predator/prey belief system, it's just the shard driven aggression that is gone.
The law is somewhat in a mess about human choice... There are assumptions about being a 'rational agent' mixed in with ideas about 'continuity of identity'. Scientific evidence strongly suggests that rationality is something humans often don't have time for - normally, learned (automatic) behaviour is what's used (see Type 1 and Type 2
thinking; though I suspect that's a bit too absolutist). Also, identity can be rather conditional on mental state, drugs, etc. - to some extent who you are can vary by your physiological state.
I've met people who seem to be physically/socially functional, but, they don't appear to have a coherent identity. They have a set of reactions, learned behaviour, but it doesn't seem to all join-up, fit together. This can confuse others, who may think they're a criminal genius, a brilliant liar, but basically they seem to be broken. Without even the predator/prey model, just getting by with what seems to work, tell people what they seem to want to hear, and do what gives them minimum pain/trouble. People with a history of abuse may be at most risk of this sort of mental mess.
Yes, people can change over time, learn coping strategies, signs that they are risking a mental state they'd prefer to avoid, and how to head it off. And, people can learn to self-observe, things like
mindfulness. But, teenagers tend to be a mental mess at the best of times (all those varying hormones, and that neural pruning...), and Shadow Stalker didn't appear to be getting the effective support she needed ('Worm' - funny that).