This is another of the utterly stupid claims made by the liar Daniel Cassidy in his fake book of etymology, How The Irish Invented Slang. Croak is an English word, which means to make a noise in the back of your throat like a crow.
In a document of c. 1440, it says “He [the raven] croukez for comfort when carayne he fyndez.” (He [the raven] croaks for comfort when carrion he finds.) In other words, this is an ancient English word which has no connection with Irish.
When someone dies, they make a croaking sound, called the ‘death rattle’ in English. In Irish we say glothar an bháis or glotharnach an bháis. In other words, the origins of croak (to die) lie in the word croak (to croak) because you make a croaking sound when you die.
According to Cassidy, croak in the sense of dying doesn’t come from croak in the sense of croaking. No, according to him, it comes from the Irish crochadh (pronounced kro-hoo) which means ‘to hang’. This sounds half reasonable where croak refers to hanging (though the pronunciation isn’t that good a match). But it is not a good explanation for croak in sentences like ‘he croaked’ (=he died) when it doesn’t refer to hanging.
The fact is that the word croak (die) comes from the word croak (croak). They are the same word and Cassidy’s claim is just another piece of childish fantasy.