Re: Not asking for a handover
The nature of freelancing is more complex than this although it's too often lost sight of, including by HMRC. Basically the engaging company is trying to balance a variable (holiday, sick leave, parental leave, training etc) staff availability against a variable workload. This can be done by recruiting more permanent staff that would be required to ensure the mismatched peaks and troughs are covered. However this also risks having under-employed staff from time to time and also risks the costs associated with making staff redundant. OTOH not having sufficient staff at the time of peak demand risks missed business opportunities. The role of contract businesses - emphasise businesses - is to ease that balancing by taking some of that risk themselves*. For a price, of course.
It's provision of services on the basis of T&Cs very different to those of employees which is the USP of a freelancer vs a permanent member of staff** for any given role. Although there may be a 24 month contract in place it will almost certainly make provision for early termination and this should be allowed for as a possibility. It's one of the things built into the rates as is time spent on the bench - the standard greeting of the agent is "Are you available?" and if the answer is "Yes" that availability is a cost to the freelancer.***
So no, don't assume two years means two years. Don't go round blacklisting companies. Don't prosecute them. You'll only damage your own professional reputation. If you're freelance it's part of the business you chose and whatever you do don't build financial expectations on it without a fall-back fund. And don't go freelance without understanding this. If they've made a mistake getting rid of their skills base regard it as an enhanced business opportunity.
* This, in my view, is what makes them businesses and what HMRC & IR35 overlook. They are taking on business risks, they're businesses and should be taxed as businesses even if they only have one principal.
** This is no excuse for trying to run a business with free-lance staff only. A business needs employees to provide continuity.
*** These are two of several factors the permie might fail to take into account when looking at freelance rates. The freelancer should not so fail.