Games being sold on physical media will likely last longer than games sold as digital downloads.
Maybe the reason physical seems to outlast digital is because Nintendo, Sony, and Microsoft are the companies most known for switching from physical to digital. These companies are greedy and anti-consumer and they seemed to have made the switch in order to push more anti-consumer practices.
There's no natural reason a physical game should outlast a digital one. The reason they do entirely comes from corporate greed. My steam library contains a copy of Gazillionare, a game released in 1994. A game still available for sale on Steam and that runs on my Linux box today. Games sold as digital downloads aren't inherently bad. The underlying issue is corporate greed.