I recently came across this post (question attached). But this rule seems to struggle once it comes to the Sanskrit - Indo-Aryan side of the family (PIE) , for example ratri in Sanskrit and raat in Hindi. (However Hindi word for eight is aath) . Then one can look at this(1) , this(2) and this(3) . which all indicate that both, the night and raat . Are they absolute synonyms, or some other explanation can be given? the night in the Latin-German side of PIE 1st this 2nd this 3rd this
Almost certainly it's pure coincidence.
It might seem unbelievable that so many languages have the same coincidence, right? But most of these languages are Romance, and we know the Romance languages share an ancestor: Vulgar Latin.
In Vulgar Latin, "night" was nocte, and "eight" was octo. The -oct- in the middle then developed the same way in both words. (You'll notice the different final vowels in all except French, by the way, and French just dropped most final vowels without a trace.)
The other two languages are Germanic, and linguists have a pretty solid reconstruction of their last common ancestor too, "Reconstructed Proto-Germanic". In this language, "night" was *nahts, and "eight" was *ahtou: once again, there's the common element *-aht-, which ends up evolving in the same way. The endings then disappear, so once again the two look the same.
And why do both Vulgar Latin and Reconstructed Proto-Germanic have their stems looking so similar? It's because these share a common ancestor too, Reconstructed Proto-Indo-European! In PIE, "night" was *nókʷts and "eight" was *oḱtōw. This is the main coincidence that all the others come from quite regularly. In both the Italic branch and the Germanic branch, *kʷt and *ḱt merged, so the two differed only in their endings. And as you've seen, all of your example languages either lost these endings, or the endings are still different today.
By the way, the merger of *kʷt and *ḱt happened in both Italic and Germanic, but not in many others. In the Slavic languages, you'll see different consonants in the middle, due to something called "satemization": Russian noči "night", vosem' "eight". You should see the same in Sanskrit and its descendants, but I don't speak enough Sanskrit to give a proper example.