If you sell a 50% share & retain the rest, it definitely could be taken & sold in a bankruptcy.
If you sell it all at an undervalue & pay a market rent to your son for the part you occupy you just might be able to argue that the sale should not be unwound, but I wouldn't be at all certain about it.
Incidentally, there is a time limit applied to unwinding of undervalue transactions. They have to be reported in bankruptcy if they took place less than 5 years before, but the risk of unwinding probably reduces the longer the time has been.
But you mustn't rely on this - bankruptcy can come from action by your creditors & you can't predict when it might occur.
If your financial situation becomes dire enough, you might consider moving out, renting, letting the house be repossessed & making yourselves bankrupt. However, it is essential you take advice on this - preferably from an Insolvency Practitioner as solicitors are generally not well up on insolvency law & practice.