I am currently going through this with my DD (14) and very similar circumstances to yourself.
Cauliflower's ideas are similar to what I find is working for my DD. When my neighbour takes her in she doesn't mess around and argue.
The school have been very supportive and originally created a gradually increasing timetable starting off with the lessons she enjoys most. It has been a bit hit or miss but their emphasis is that she comes in every day and even if she has to go to the library or the medical room for part or all of the day I email in any concerns and she has a couple of members of staff that she can report into. She also has the option of a card she can wave if she wants to leave the class no questions asked.
Things the therapist has advised is no sleeping during the day. She has been having trouble sleeping at night. She can rest not sleep during the day and to keep a chart of what she has been doing. eg. resting listening to music, eating, physical activity, electronics (phone, tablet, xbox).
Making a list of tasks, activities for the day so she feels in control of her day. eg. 7.30 wake up check phone , 8.00 shower, 8.20 breakfast, 9.00 get ready for school, 9.15 travel to school, 10.00 French class etc.
She has also just started wearing a fitbit which monitors her sleep. This actually has had the effect of reassuring her that she does actually get sleep and she can discuss the levels of REM ect. with her therapist. It also has a mindfulness app that reminds her (vibrate mode) to take breaks and guides her through 1 minute breathing exercises. The school are happy with her having it so long as it is not disrupting others in the class.
Another thing the therapist has suggested is to especially at night if things are troubling her is to write it down. This action gives you permission to put the "problem aside" for the moment.
A book i am reading at the moment which has great reviews is www.amazon.co.uk/dp/B06Y5V8LNB/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1&tag=mumsnetforum-21
I went to see my GP to see also about medication and was told that this is something that they felt able to prescribe given her age. It maybe something that can be prescribed by a mental health practitioner through CAHMS. Our doctor has referred her but feels that she may not get accepted to CAHMS. The therapist who my DD feels comfortable with says that once CAHMS are involved we will not be allowed to continue seeing her at the same time.
PM me if you want to chat 