The finding was made during an investigation into the case of an autistic man detained since 2001.
Tony Hickmott's parents are fighting to get him housed in the community near them.
BBC News overturned a court order which had prevented reporting of the case.
Mr Hickmott's case is being heard at the Court of Protection - which makes decisions on financial or welfare matters for people who "lack mental capacity".
Senior Judge Carolyn Hilder has described "egregious" delays and "glacial" progress in finding him the right care package which would enable him to live in the community. He lives in a secure Assessment and Treatment Unit (ATU) - designed to be a short-term safe space used in a crisis. It is a two-hours' drive from his family.
This week, Judge Hilder lifted the anonymity order on Mr Hickmott's case - ruling it was in the public interest to let details be reported. She said he had been "detained for so long" partly down to a "lack of resources".
Like many young autistic people with a learning disability, Mr Hickmott struggled as he grew into an adult. In 2001, he was sectioned under the Mental Health Act. He is now 44.
"Nine months we were told he'd be away, until they found him a suitable place in the Brighton area," says his father, 78-year-old Roy.
Mr Hickmott was finally declared "fit for discharge" by psychiatrists in 2013, but he is still waiting for the authorities to find him a suitable home with the right level of care for his needs.
"If he'd murdered someone he'd be out now. He's lost his family, he's lost his home," says his mother Pam, who is 81. "He's just a shadow of the human he used to be. There are so many families like us - crying and screaming. We are our children's voices."
His Assessment and Treatment Unit care is paid for by the NHS - but the cost of housing and caring for him in the community with trained staff would fall to Pam and Roy's local authority, Brighton and Hove, and local NHS commissioners. That process has been bogged down in delays and wrangles. Pam believes the delays are over funding.
"We've got judges telling them to get on with it but they're still not doing it, they're still fighting over the money."
Finding suitable housing with skilled support staff can be a complicated process. But Mr Hickmott's family argue it should have been put in place a long time ago.
Pam and Roy's home is full of photographs showing their son in happier times. Birthday parties, smiling with his two sisters, holidaying with his mum and dad. The couple used to visit him twice a week - although, now they are that bit older, they just travel up on a Thursday.
"I've gone through three cars traveling to and fro," says Roy. "Sometimes Pam and I travel back and pull in at the side of the road and we just cry."
Six evenings a week - at 17:00 - they speak to their son on the phone.
"He describes all the rooms in our house. His memory of his home is all he's got," says Pam.
During past visits to the ATU, Pam says they drew pictures of a house with a garden by the sea. She would tell her son he would be home soon.
"He doesn't believe us any more. He doesn't believe he's coming home."
In addition to the 100 patients, including Mr Hickmott, who have been held for more than 20 years - there are currently nearly 2,000 other people with learning difficulties and/or autism detained in specialist hospitals across England.
In 2015, the Government promised "homes not hospitals" when it launched its Transforming Care programme in the wake of the abuse and neglect scandal uncovered by the BBC at Winterbourne View specialist hospital near Bristol. But data shows the programme has had minimal impact.
Ministers pledged to reduce the number of patients in such hospital settings by 35% by March 2020, with the aim of people being back in their communities with tailored support packages. But, by March last year, there were only 300 fewer patients detained - a reduction of just 13%.
The 35% target has now slipped to 2023/24.
It was further BBC News analysis of this official data which revealed that of 350 people detained for more than a decade, 100 of them have been in hospital settings for more than two decades.
Numbers of people with learning disabilities and/or autism in inpatient units in England:
* March 2015 - 2,395
* March 2020 - 2,095
* October 2021 - 2,070
Source: NHS Digital
Last month, crossbench peer Baroness Hollins - who has been reviewing long-term segregated care - told the House of Lords it was time to "end the scandals" and give people back their lives. But she also spoke of another man - Mr W - held largely in solitary confinement for 20 years but who, for the past three years, had lived around the corner from his parents.
"Despite still recovering from the trauma, he is now happy," she said.
This is what Roy and Pam Hickmott want.
The author of the Serious Case Review into what happened at Winterbourne View, Dr Margaret Flynn told us the "institutions" detaining people like Tony should not exist.
"It's appalling. These people are not criminals. They are stuck, just as people used to be stuck in long-stay institutions."
She says there is so much testimony from people with a learning disability and/or autism - and their families - about "harmful experiences" when they are removed from "all that is familiar to them".
Judge Hilder - who has allowed Tony Hickmott's case to be reported following an application by the BBC and Sky News - has ordered the authorities involved in his care to work together to move him back to Brighton by May.
In a statement, Brighton and Hove Council said: "Tony has extremely complex needs. We've tried on a number of occasions to find a sustainable solution nearer to Brighton… these were not successful." The council says it is working with the NHS and Mr Hickmott's family to find other options.
NHS England in the South East says it is continuing to work with partner organisations - and Roy and Pam Hickmott - to ensure "appropriate care and support is in place".