No, they stay here as long as they need regardless.
A very noble but ultimately completely impractical sentiment.
Ukraine is a large country with a huge population, who knows what the final number of people fleeing will be in the end?
It is fairly likely that Russia will ‘win’.
It would be very reckless to promise 44 million people that they could enter UK with no restrictions, and that they will be supported indefinitely.
Certainly, nowhere near that number would arrive in the UK, with most of them wanting to currently stay nearby so they can hopefully return to their homes.
But if Russia wins, then Ukraine will be no more. It will be a part of Russia. However many people manage to escape will not be able to go home.
It’s probably a good thing that the UK is thinking ahead about what would happen in that case (though I agree that those with family already in the UK should be sped to the front if the queue).