PS2 games were $50 in 2000 which is $73 with inflation, Video game development is significantly more expensive now than 20 years ago. The flat line increase for video games is a large part of why crunch culture exist in the industry.
Games this gen are also selling far better now then they were in the year 2000. Many franchises at the time like GTA were extremely young and didn't have an established brand or foothold in the market yet as it takes years for games to become extremely popular. The gaming industry has also grown exponentially since the PS2 era and will only keep growing.
GTA sales this gen obviously are killing the sales of the older GTA games right now, the COD franchise is more popular than ever, even Nintendo games are selling the best in their respective franchises on the Switch. Many other franchises like Uncharted, Witcher 3, NBA 2K and more are selling better than ever this gen, so that kinda makes up for the higher development cost of games over time, also there's DLC, Microt-transactions, digital distribution that cuts out the middle man, making more money for these developers.