I feel so bad for the duke. This story would've been so good if she had actually had some common sense and would've approached this with the attitude of protecting the duke from whoever is trying to frame him.
Alternatively, if the author really just wanted to write a silly dynamic between her and the duke, then she should've been a true crime junkie instead of a legal expert. The fact that she makes so many grievous and obvious mistakes despite being a prosecutor breaks all immersion.
This is a good example to authors in the sense of what not to do. If you're going to write a character that's supposed to be intelligent or educated, you'll have to do some research to SHOW the character making intelligent choices, not just telling the reader "this person is smart (trust me bro)". This main charcater doesn't understand anything about the law or the logic behind prosecution, she barely even has common sense. Her intelligence only exists in comparison to complete idiots (her siblings), or when she needs to suddenly have magical knowledge or skills (economical advice, gambling???) to look cool so other characters will worship her.