I think the difference is India is a major startup hub that mostly caters to the local market so the effort to shift to more resilient income streams not completely dependent on the global market are underway, something Brazil did not do.
https://tech.hindustantimes.com/tech/news/india-now-2nd-larg...