The ending of episode 78 shows Sonic and his friends departing from Earth on the Space Colony ARK. They are being taken away by Chris, who is now in space with his father, leaving behind his friends on Earth.
Shadow is not present in this scene, and there is no indication that he is anywhere near a grave. It's possible you might be thinking of a different scene or a fan-made interpretation.