Whether Earth will be swallowed is hotly debated (no pun intended). It's on the borderline of swallow-vs-non-swallow such that every new bit of research seems to shift the boundary back and forth across the threshold.
A key variable is how much mass the sun will lose before it swells to Earth's orbit. Surface instability typically spits off chunks of the expiring star such that it loses mass. Mass loss will move the orbits of the planets outward, giving Earth more margin, but how much mass is lost is not well understood yet. It depends on the the star's size, rotation, and composition, which is unique for every star, and formulas that factor all 3 of these are only rough drafts.
Earth will at least be BBQ'd.