Undertale and Deltarune are parallel worlds with alternate rules. Whatever happened to Gaster also affected Sans and swapped him with his parallel version. Deltarune Sans lost more and has given up going home. Undertale Sans gained more and is comfortable in this new live aboveground