It is an interesting comment but misleading and irrelevant to the subject. When you pay for your pension (in a country like France) it is not included in the GDP because it is considered a tax.
When the government pay their pension to a pensioner it is not included in the GDP [0].
There are two ways to calculate GDP, an income approach and an expenditure approach. In the expenditure approach, transfer payments are not listed as an expenditure. But when a retiree buys something with that money is counted.
You’re incorrect to say that an economy without social security artificially seems like it has a higher GDP than one with social security. It is counted as income to the employee, and anything purchased with it is counted as consumption.
When the government pay their pension to a pensioner it is not included in the GDP [0].
[0] https://www.investopedia.com/ask/answers/082415/are-social-s...