In the NBA a player's current team get what's called "Bird Rights," in that they can offer more money and an additional year. But as you point out, it doesn't work because players have every incentive to team up to form super teams in big/warm-weather markets. This doesn't apply to the NFL because there are no max contracts and there is a hard salary cap. If there was a soft cap (that teams can exceed by paying fines) in the NFL, the Dolphins would be a super team due to the weather and the sheer amount of NFL players that are from South Florida.
The NBA makes NFL finances look sane. I just looked this up. The 2022-2023 salary cap in the NBA is $123.7 million. The Warriors payroll is $188.7 million. On top of that, they pay a luxury tax of $164.9 million. THEIR LUXURY TAX PAYMENT EXCEEDS THE SALARY CAP by $42 MILLION.