I think the post of @Saptha Visuddhi is related to the question because it is very difficult to avoid this departure into why Buddhism became extinct in India when asked a question about heresy.
Generally, 'true believers' do not persecute others & it is the 'true heretics' that persecute others.
I would speculate King Asoka was related to the distortion of the teachings that gave pre-eminence to creating populist reincarnation & Brahmanism-directed (conversion) teachings, which ultimately lead to the extinction of Buddhism in India.
I would speculate Buddhism was a victim of its own anti-Brahmanism-directed propaganda.
If we read the Pali suttas, what became to be 'Hinduism' (eg. Tri-Murti of Brahma-Vishnu-Shiva or moksha after reincarnations) did not exist during the Buddha's life but, in fact, was possibly distorted adaptations of the Buddhist teachings.
For example, the Pali suttas contain suttas (MN 1, AN 4.124, etc) that equate each meditation jhana with a Brahmanistic god but then state attachment to being a Brahmanistic god leads to hell.
While such suttas appear to be a form of anti-Brahmanistic propaganda (not spoken by the Buddha), most Buddhists believe the Brahman cosmology to be a true & real Buddhist cosmology.
This shows how Buddhism was possibly a victim of its own anti-Brahmanism-directed propaganda & shows how monks with the True Dhamma were probably treated as heretics (while monks with the false teachings that were indifferentiable from Hinduism got absorbed into Hinduism) .
One has to ask what heretical atmosphere prompted Nāgārjuna to compose so many treatises in an attempt to expound a pure & genuine Buddhist doctrine of emptiness & cause-&-effect?
For example, last century in Thailand, there was a young monk, who named himself Buddhadasa, who began publicly teaching supramundane Dhamma, which resulted in the Thai religious authorities (for a short time) accusing young Buddhadasa of 'heresy' & seeking to disrobe him.
He was opposed by conservative monks and laymen such as those from the Abhidhamma Foundation and Anan Senakhan who strongly disagreed
with his interpretation of Buddhism to the point of accusing that
Buddhadasa devalues Buddhism by explaining it simply and that tried to
match the ultimate truth of Buddhism with the ideas of modern man.
Buddhadasa was even accused of being a heretic and communist.
In his book he wrote the title "What is Paticcasamuppada" (1971) showing the distinction between what he considers the interpretation
of Buddhist teaching using Hindu concepts and in the Buddhist sense.
He is convinced that uncritical adherence to the Buddhaghosa orthodoxy
has obscured a real encounter with the Buddha's dhamma. The criticism
of Visuddhimagga implies that Buddhadasa goes against the belief and
understanding of not only most Thai Buddhists but also Buddhists in
general. Consequently, he is condemned by some groups of monks and
laymen as an ungrateful and heretical person who destroys
Buddhism. On the other hand, his book has became an important
reference which most of Buddhist students have to take into
Buddhadasa's Movement: An Analysis of Its Origins,
Development and Social Impact