There is no way to know if those deaths were because or with Covid-19.
Also correlation doesn't mean causation. Confinement caused a lot of hardships on people. Hell, fentanyl alone kills hundred of thousands each year, that's not even counting alcohol, other drugs, stress and solitude.