I'm not sure what you mean. I'm in the UK we categorized into deaths due to COVID-19 and those who died with COVID-19.
If you get hit by a truck while infected with COVID-19 you died because you were hit by a truck. I'm not sure how you would do it any other way.
Early during Covid, some people claimed that the government inflated the victim numbers by counting every excess death if the person had Covid before dying, even if they also had a different perfectly valid reason to die. (Think terminal cancer or AIDS.)
That was even technically correct -- the worst kind of correct. Of course, you could have had Covid but died of a heart attack. But then they made the leap to saying "hence we don't know if Covid even is very deadly", and at this point it was just pure denialism.
Coming back to the heatwave. We know that heat contributes to dangerous health conditions. We know there are excess deaths every time the mercury crosses some threshold. Yes, some of these excess deaths could have been unrelated to the heat. No, this doesn't mean that the stats we have are totally BS.