I don’t think a child hiding in the toilets during lesson time is truancy actually. OP is asking about a legal issue, and legally, truancy is absence from school.
A child hiding in the toilets, or sitting in the wrong classroom, or indeed climbing a tree, or sitting under a table during lessons, or throwing spitballs, or hiding in a cupboard, etc etc, is a child behaving badly at school, and it’s a school internal discipline issue.
OP if the school is threatening to fine you because she’s in the wrong lesson then you need to work with the school to address your child’s bad behaviour, I’d suggest in the morning you escort her to a teacher and she has to stay with that teacher until register etc. Basically if she won’t voluntarily go to the right lessons then she gets escorted from lesson to lesson and doesn’t get breaktimes 🤷♀️ If she’s so clever surely she can accept that skipping year 10 = fail GCSEs?!
I’d also suggest you discipline your child. If my kid did something like that she’d first lose access to TV/internet/gaming/friends for a week, and then if the bad behaviour continued I’d escalate punishments until she stopped being so naughty.
And yes lessons can be boring. So can work. Childcare. Homelife. Many things. I spent a lot of my school lessons doodling and playing noughts and crosses just for some kind of stimulation. Boring is not an excuse for rule breaking, and the earlier she learns that, the better. I’m so bored right now that I’m writing to strangers on the internet, but that doesn’t mean I can go trespass into the Ritz or Centerparcs or wherever takes my fancy.