I don't think that's the reason (maybe for a handful). EU-origin students dropped massively after Brexit because prices effectively more than doubled for them (international fees plus all of the associated visa costs, NHS surcharge, etc). The real reason is likely to be the new graduate visa the government introduced in 2021. The situation before they changed the rules on Jan 1st was that if you got accepted on a master's degree, that was effectively a right to stay in the UK for three years, because you get your one year of study, plus two years afterwards to work without needing sponsorship from an employer. So that's obviously caused a huge shift from people who would do a masters and then go home, to people who are doing a masters as a way of moving their family to the UK long-term. It's a result of a deliberate policy of the Conservative party, who are now moaning about the levels of immigration. They have changed the rules now, but let's be clear, it was their rules that caused the 'problem'.
It basically made it much easier for someone with a bit of money to come to the UK, because it's much easier to get accepted on a master's degree you're paying 20 grand for than it is to get someone to offer you a job and sponsor you from overseas. And once accepted, that's 3 years in the UK for you and your family, provided you can prove you have the right amount of savings. But this is what they said they wanted. When unveiling this grand plan, they said they wanted to make it easier for highly-educated students to stay after their course and contribute to the economy. Then as soon as people take them up on the offer, they get cold feet.
It's worth also comparing the rules for international students and British citizens looking to bring dependants. A UK citizen wanting to sponsor a spouse (or other dependant) must pay £1846 application fee. A student looking to sponsor a dependant needs to pay £490. Admittedly the spouse visa lasts 2.5 years, and the student one only a year, but it's still significantly cheaper. A dependant for someone on a graduate visa is £822 for 2 years. Both have to pay the NHS surcharge, which is the same. The UK citizen then has to prove income of £18,600, soon to rise to £38,700 to prove that they can cover any costs of their working-age dependant who can legally get a job immediately. Meanwhile, a student only has to show £6,120 to support a child for a year. A child that by definition can't work and is entitled to free state education for the duration of their visa. The whole thing makes not sense whatsoever and has clearly just been made up on the hoof by whoever they think they can get rinse for money without causing a fuss.