The new home secretary, Sajid Javid, has wasted no time in disowning the phrase “hostile environment”. But the real test he faces isn’t one of superficial terminology. First, there is the question of whether he will do anything to dismantle the day-to-day reality of prejudice that ensnared the Windrush generation with such appalling consequences; whether he will concede that obliging landlords to check people’s papers under the threat of fines or imprisonment drags us backwards to a world where people with dark skin routinely face discrimination; or that cutting off access to housing and work risks forcing people into exploitation on the black market.

But there’s another dirty secret buried in the Home Office. The government’s futile, arbitrary target to reduce net immigration to the tens of thousands means it is not just imposing further restrictions on who can come to the UK from abroad (no matter that the NHS is desperate for doctors). It is making it harder for people here legally, including those who’ve grown up here, to become permanently settled.

Children in care have had their applications for citizenship rejected because they have been cautioned by the police

First, the eye-watering fees mean it costs more than £1,000 just to claim a child’s legal entitlement to citizenship if they were born in Britain to parents not settled here (they get this entitlement either when a parent becomes permanently settled or after they’ve lived here for 10 years). The Home Office makes a profit of £640 on each case. Some parents just don’t have the money, which means their British-born children may later be unable to work, go to university or use the NHS. Astonishingly, local authorities are obliged to fork out this fee for affected children in their care: a big financial disincentive to sorting this out before they turn 18. And if they don’t make citizenship applications for children – not born here, but who’ve spent most of their lives in care – they lose the right to apply altogether when they turn 18.

For a young adult not born here but who has mostly grown up in Britain, the costs are even higher. They can apply for limited leave to remain for two and a half years after they turn 18, but it will cost more than £2,000 in fees and surcharges each time. They can only apply for indefinite leave to remain after 10 years, by which point they will have already paid at least £8,000. If they forget to renew their limited leave to remain (there are no TV licence-style reminders) or they can’t afford to do so, they have to start back from square one. If they want to go to university, they are treated as international students – charged thousands of pounds more in fees and blocked from student loans – until they’ve had three years of limited leave to remain, despite the fact their parents may have long been British taxpayers.

‘Imagine trying to negotiate your way through all this as a young adult with limited financial resources.’ Photograph: LeoPatrizi/Getty Images

The system is so fiendishly complex it takes a lawyer to navigate it. But there’s no longer any legal aid available, so these young people have to fund their own legal advice. There are plenty of sharks out there; the charity Just for Kids Law has seen many cases in which shoddy advice means applications are rejected.

In recent years it has become increasingly difficult to provide evidence that meets Home Office tests. There has been a dramatic shift in culture such that just a few years ago, if you could recall childhood memories of national events in an interview, that would have been accepted as proof that you had grown up in Britain. Today the bar is so high that people have to provide four pieces of documentary evidence for each year they have lived here. The sworn written statements from a doctor or a neighbour that would be accepted as evidence in a criminal court won’t do. The Home Office refuses to grant children in care citizenship unless they can produce documents such as their parents’ birth certificates – even when they are estranged from their birth parents.

Q&A What is the Windrush deportation crisis? Show Who are the Windrush generation? They are people who arrived in the UK after the second world war from Caribbean countries at the invitation of the British government. The first group arrived on the ship MV Empire Windrush in June 1948. What happened to them? An estimated 50,000 people faced the risk of deportation if they had never formalised their residency status and did not have the required documentation to prove it. Why now? It stems from a policy, set out by Theresa May when she was home secretary, to make the UK 'a really hostile environment for illegal immigrants'. It requires employers, NHS staff, private landlords and other bodies to demand evidence of people’s citizenship or immigration status. Why do they not have the correct paperwork and status? Some children, often travelling on their parents’ passports, were never formally naturalised and many moved to the UK before the countries in which they were born became independent, so they assumed they were British. In some cases, they did not apply for passports. The Home Office did not keep a record of people entering the country and granted leave to remain, which was conferred on anyone living continuously in the country since before 1 January 1973. What did the government try and do to resolve the problem? A Home Office team was set up to ensure Commonwealth-born long-term UK residents would no longer find themselves classified as being in the UK illegally. But a month after one minister promised the cases would be resolved within two weeks, many remained destitute. In November 2018 home secretary Sajid Javid revealed that at least 11 Britons who had been wrongly deported had died. In April 2019 the government agreed to pay up to £200m in compensation. Photograph: Douglas Miller/Hulton Archive

Even if you can get all these documents together, there are two reasons why there’s no guarantee your application will be processed. First, the Joint Council for the Welfare of Immigrants (JCWI) tells me the Home Office is apt to lose people’s files, or claim it has never received documents. Second, every person over the age of nine applying for citizenship or leave to remain is subject to a “good character” test. JCWI has seen people fall foul of this test simply because they have had a previous immigration application rejected for minor errors.

Worse, according to Solange Valdez-Symonds of the Project for the Registration of Children as British Citizens, there are cases where children in care have had their applications for citizenship rejected because they have been cautioned by the police – all too common for children who have had troubled childhoods.

If you make even a small error in a complex form that spans tens of pages, your application risks being rejected: JCWI cites rejections as a result of someone getting one figure wrong in one instance of a date filled in multiple times across the same form. While mistakes are rife in Home Office decision-making (half of all immigration appeals are now successful) the right to appeal has been scrapped in most cases. If you’re rejected, your only recourse is to apply – and pay up – again.

Imagine trying to negotiate your way through all this as a young adult with limited financial resources, who grew up in Britain, who identifies as British – who to all intents and purposes is British. Everything about this system is designed to catch you out, to end in rejection. If you run out of cash or steam, you’ll end up as one of the “illegals” denied access to healthcare, education, housing and a job by Theresa May’s “hostile environment”. Just for Kids Law estimates that tens of thousands of young people could be affected.

This is the sick reality that should be as big a scandal as the treatment of the Windrush generation. Even as it promises to right those terrible wrongs, the government is knowingly, consciously creating the next generation of Windrushers. And it doesn’t care.

• Sonia Sodha is chief leader writer at the Observer