Durant is not leaving the Warriors next year. Or the year after. Or the year after that. He'll stay there for a while.
And second of all, there are more than 15-20 players in the NBA worthy of a max contract. This thought that only superstars deserve one is nice in theory, but it has absolutely no grounding in reality. A perennial all star (and near all-NBA player) like Hayward is absolutely worth a max contract. That's why 3 teams are actively trying to give him one this summer (and more would try, too, if they had the ability to)