West Australian authorities say they will continue to lock down children in cells if necessary despite the Supreme Court ruling the practice unlawful.
It comes as lawyers prepare to file a class action over conditions at Perth's Banksia Hill detention centre, where youths have been isolated for up to 23 hours per day.
Supreme Court Justice Paul Tottle in August ruled such lockdowns were unlawful after examining one teenager's treatment this year.
Justice Tottle found the boy had been repeatedly locked up for at least 20 hours per day, primarily due to staff shortages.
The disability royal commission on Thursday heard Banksia Hill was still operating with about half as many youth custodial officers as it needed.
In evidence given at a hearing on Thursday, Department of Justice director-general Adam Tomison would not rule out further lockdowns.
"The concern was around staff shortages leading to the lockdowns and that was unlawful. I accept that and obviously we'll work very hard to avoid that," he told the inquiry.
"But it didn't preclude me (from using them) ... if the safety and the security of the facility requires lockdowns.
"That doesn't mean ... I can just lock kids down because I feel like it, but if we have multiple incidents occurring over the course of a day then young people are going to spend time in cells more than I would like."
Dr Tomison was asked about the extensive lockdown of a teenage boy who had fetal alcohol spectrum disorder, post-traumatic stress and developmental difficulties.
"I'm absolutely prepared to accept that it wasn't acceptable and it was not great practice to treat that young man in the way he was," Dr Tomison replied.
"Absolutely I accept that, but I had no other option for that young person.
"I would prefer that a young person like that would be housed elsewhere in a different facility. I don't have that option."
Hundreds of past and present detainees have signed up for a planned class action led by Levitt Robinson Solicitors, alleging they suffered inhumane treatment at the facility.
The law firm also plans to seek a Federal Court injunction to stop detainees being moved to a standalone unit at a nearby maximum-security adult prison.
A group of 17 boys was initially moved to Unit 18 at Casuarina Prison in July after detainees self-harmed and destroyed their cells.
Dr Tomison said Banksia Hill had been in a "state of emergency" prior to the transfer.
The McGowan government has promised a review of young offender laws will examine the isolation and separation of detainees.