Although I’d love to see that happen more frequently, this is simply not realistically doable for most commercial games.
Almost all of them use licensed third-party libraries which are integrated deeply into the game’s code base, but which can’t legally be distributed as part of an open source project. So in order to be able to open source a modern commercial game, you’d have to put in quite a lot of work finding all of your code integrating with commercial libraries and either replacing or removing it. And if that’s not enough, you’d probably have to have your (expensive) legal team check the entire code base for any infringements just to be on the safe side.
All that work for no monetary gain just isn’t a very good business case. So, unfortunately, I wouldn’t expect a lot of modern games to be open sourced any time soon.
There‘s a great video on that topic by Matt Parker (Standupmaths) which I‘d wholeheartedly recommend.
TLDW: No, terrain elevation isn‘t generally taken into account when calculating a country‘s surface area, though the actual method differs slightly from country to country. Switzerland would be around 7% bigger, if its mountains were to be taken into account.