A couple of situations I need to handle but cannot find the right information yet.
1. My contract (and consequently the CoS) expires 2 month after baby is due;
My employer will not extend my contract further due to the absence of funds.
I am entitled to enhanced maternity leave until the last day of my contract and then to SMP as per law. However, what should I then do with my documents (I plan to deliver the baby in the UK and to live in the UK afterwards), since my visa and CoS will not be valid anymore.
2. Since my contract expires 2 months after the baby is due, I am looking for a new job that could provide me with a new CoS before the baby delivery and before the expiry of my contract.
If I had not had the constraint of the CoS my choice would have been to stay with the baby for the first year (that is take 52 weeks of maternity leave) and then start with a new job. Can I still do this in my situation

The new employer that might sponsor me will certainly not grant me any such a long maternity leave and I have no doubt that none of this if allowed will be paid, since to have some maternity pay I should have been working with the employer from before getting pregnant.
The old employer (now current employer but supposedly old when I get the new employer) will stop any maternity pay as soon as I resign or the contract expires whichever happens first and even in the case if I start working for a new employer after the contract expires but while receiving SMP from the old employer.
3. Considering point 2, I need to find a balance between maternity leave, CoS and old/new employer.
Considering such balance, would it be possible to be covered by a CoS and have continuous residence in the UK if I manage to find a job that would sponsor me and that would lets say employ me 3 months after the baby is due. I would in this last case have 1 month not covered by any CoS ... how can I make things compatible?
Thank you to anyone with such experience that can give me some insights related to these issues.