The Indian Navy has also done something else. They are not afraid to pull a trigger. In their piracy efforts, they are more aggressive than the USN in that respect.
Also, India is a nuclear power. They have about 100 nukes on ICBMs against China with about 240.
It’s enough that China would be devastated.
India is more able to defend itself than it’s appearance would give the casual observer.
The problem that both USN and IN face is political leadership is filled with, excuse the word, pussies.