I vaguely remember the protagonist is saved from a boat, which lands on an island. She’s not allowed to leave and ends up in a tribunal or some other sort of trial regarding whether or not she should live or die. She is ultimately too bright and has too many questions during the interrogation focused on trying to determine how much she knows. It ends with a plot twist where she realizes she’s a robot and therefore can not be allowed to live.
I don’t remember the author or title but it was a quick read, and perhaps was a young adult book. The jacket had a picture of her but it only showed the back or side of her blond hair and not her face.
I read it about 4 or 5 years ago.