Not all dogs tongues will hang out when they die but if your dogs tongue is hanging out when dying they are likely dying of a seizure or other neurological disease.
A dog sticking it's tongue out when dying could also be sticking their tongue out to try to breathe and if they are dying they will start gasping for breath.
It's normal for dogs to sometimes stick their tongues out when dying just like when they may be breathing harder such as in the summertime the dogs tongue sticks out as they try to get more air into their mouths.
A dog sticking it's tongue out when dying is called medially hanging tongue syndrome which is what vets call the condition.
But it's just a reaction to the dog dying if the dog does it when dying.