If they didn't have the means to test people that where dying, then they couldn't test people who where infected and weren't showing symptoms, and there is way more asymptomatic people than people that went to the hospital and weren't tested properly.actually every country lacked tests and the death rates from corona virus are much higher than they report. by comparing total deaths of same month in italy in 2019 and 2020, the numbers are about 5x higher than what they report on sites related to coronavirus
in other words they lacked tests or tests didnt work or they didnt have time under pressure to classify patient death correctly. also many of them died just to be discovered days/weeks later.
So your argument is valid but it also means that countless people have not been checked and weren't sick, and this reduces the death rate.