Without any real world benchmark testing of these games, everything we say here is pure speculation, of course.
But I think the M380 will be able to run games as well, even at 1440p. Maybe not doing hardcore raids in WoW but casual gaming for sure like Rocket League and Cities Skylines being two examples.
Diablo 3 and Starcraft 2 shouldn't be any problems either. Maybe not with all settings at the max but I'd be surprised if it couldn't handle between medium and high settings smoothly at 1440p. FPS games however, with high level of details, or any games in 4K-5K resolutions are obviously a no-go but I don't think anyone that buys an iMac has any delusions of playing games at native resolution.
My point is that I think the M380 will handle light gaming with excellence. M390 should be able to handle light-medium gaming whereas the M395 and M395X should be able to handle quite a high level of gaming. None of these will handle 4K or 5K gaming well though.
And future proofing? Obviously the M395X will outlive all the others, but will you actually need that much performance? And more importantly, is it worth the extra money? The M390 or maybe even the M380 will be viable for YOUR gaming needs for 5-6 years. People will argue that the M395X will have better resale value, as always, but looking at current ads for older gens iMacs, the specifications doesn't seem to matter that much. The most important thing is how well it's been kept, are there any noticeable dings or scratches, etc. So while you might get a bit more money for the M395X, I don't think you'll get the 550$ back compared to the M390, or even the the 750$ compared to the M380.
No doubt, there will be people that actually NEEDS the performance of the M395X but people that recommends the top of the line model "just because it's better" seems like a waste of money. If you have the money and don't care, sure, go ahead.. but if you don't mind saving a few hundred bucks, make sure what your graphical needs are before purchasing.