Leaving school

How do you keep a 14 y.o in school. She is now just constantly climbing over the school gate and leaving. She used to do this when she was upset or overwhelmed but now she's doing it when she's happy, bored or just wants to go somewhere. 

For example, today she left, and wanted to go to the shop which was only down the road. Luckily the gate is in front of the head teacher's office, so she followed her and instead they went for a walk round the block and had a chat. She then did it an hour later, wanting to go to the shop again, but another teacher followed her and told her that they can do something else instead of the lesson, so now the teacher is getting her word searches ready for when she's not wanting to do lesson. 

My problem is that she's in school's hands when I'm not there and when I'm working so how can they keep her safe. They have someone with her all the time and sometimes she doesn't like being followed so can become agitated and aggressive. What do I/we do when she does leave because its a big safety issue?

Since, she is wanting to go to the shop, I have found out why she says that. It's because, when she's bored, she will usually eat since she has noting else to do. (She won't eat anything the school offers except at break time). Anyways, my biggest worry is that no one sees her leave, but I know they'll find out quickly, and also the dangers like traffic (near a round-a-bout and a busy main road) and I don't want anything bad happening to her... 

What can I do.. I can't work without thinking about her....