Sadly billions of people would die and not be able to find a way off the planet should the sun become a red giant, even in the future.
Not to worry, though! All life on Earth will cease long before the sun becomes a red giant. As the sun ages it gets hotter and hotter. We estimate that in about a billion and a half years it will be so hot all the oceans, rivers and lakes will have dried up and all vegetation and everything else will cease to be. All that happens billions of years before the sun becomes a red giant.
On the upside, we will finally get rid of all the bad people. By that time, Earth might look something like this: