By 2018, India was only a year away from general elections. In key state elections that year, the opposition Congress Party unexpectedly scored four victories. Modi faced a serious domestic challenge and, after the 2017 Doklam border standoff, could ill-afford another confrontation with China. Following the Doklam crisis, China expanded its military forces and works in the area. Any future confrontation was therefore unlikely to be resolved in India’s favour.
On another front, relations with the United States under President Donald Trump have deteriorated. Washington’s reduction of H-1B visas for Indians, the worsening trade war, insistence that India stop buying Iranian oil and a threat to curtail military cooperation if India purchased Russian S-400 missiles dashed hopes for a smooth partnership. Furthermore, Modi’s meeting with Trump at the East Asia Summit in Manila in 2017 went poorly. Elsewhere, Trump was caught on camera mocking Modi’s accent.
In part this policy of balancing is because India is too weak compared to China.
If Trump is alienating Modi needlessly as the article says, Trump has a role in this change. Which is a shame given that even Obama didn't reject for long the opening that Bush 43 made with India.
Although I doubt that Trump's trade policies and tone are more important than the Indian military and economic weakness portion that makes Modi wary of risking a visible defeat at China's hands. For all that Trump is blamed for a portion of the reduced ties, American-Indian military and defense industry cooperation remains strong and growing.
Further, don't underestimate the lingering effects of India's Cold War nonalignment policy, their socialism, and their close ties to the USSR, which made dislike of America an all too common lingering outlook in India, notwithstanding the dramatic changes the collapse of the Soviet Union and the rise of China have made for India's security environment.
Also, I'd say that India understands that America's growing containment of China is more firm under Trump, and that gives India a little more room to maneuver diplomatically without worrying that India will be left alone to face China.
Still, it should be a priority of America, Japan, South Korea, Taiwan, the Philippines, Vietnam, Australia, New Zealand, Indonesia, Singapore, and Thailand to pull India back into a posture of resisting Chinese territorial ambitions.
UPDATE: As long as India firmly believes they can balance between America and China, India can ignore the fact that India's dysfunctional weapons development and procurement system is China's secret weapon to defeat India in a war.
Pakistan can be defeated despite such problems. China cannot be. Corruption within India's defense industry demands that Pakistan be seen as the major threat to India, I suppose.