Unfortunately, this is a risk of paying rent upfront. I do not think anything can be done to mitigate this other than you taking utmost care not to be detected.
As an aside, under Section 21, a landlord has to give you two months notice that he is evicting you, so at the very least, try and see if they will accept three months rent upfront if only to lessen your financial risk.