An application to keep the 13-year-old in a secure facility for another six months has been approved by the Supreme Court.