This post clarifies the fullest meaning of Hindu scriptures concerning ahimsa.
अहिंसा परमो धर्मः
धर्म हिंसा तथीव च
ahimsa paramo dharmaha,
dharma himsa tathiva cha
धर्म एव हतो हन्ति
धर्मो रक्षति रक्षितः
dharm ev hato hanti
dharmo rakshati rakshitah
http://www.hindupedia.com/en/Ahimsa_Paramo_Dharma explains succinctly:
‘"Ahimsa Paramo Dharma" is a Sanskrit phrase that was popularized by Mahatma Gandhi and is often repeated by many leaders today to demonstrate the universality of Ahimsa. Loosely translated, Ahimsa means Non-violence, paramo means topmost, ultimate, or supreme, and dharma means duty. Thus, the entire phrase means that non-violence is the topmost duty to the extent that it supersedes all other duties. For someone who holds this true, it means that there is no selective application of ahimsa...it must be applied in every case and in all matters. This universal sense leads to an unconditional and unilateral abandonment of violent resistance, under any and all circumstances (as in the philosophy of Buddhists and Jains). Sanatana Dharma does not impose total non-violence on its followers except in the case of ascetics. Ahimsa is a general dharma that is superseded with himsa (violence) in order to protect dharma.[1]. Ahimsa is only loosely translated as non-violence. Unlike the English word 'non-violence' (which is absolute in its meaning), ahimsa means non-violence in a relative sense. There are times when violence can also be considered ahimsa if that violence is used to stop greater violence. For example, a king should always raise his rod of chastisement to keep peace and order in his country. He will fail in the discharge of his duty if he does not punish the wicked, and his country will be in a state of utter chaos. To hang a murderer is Ahimsa for a king. To kill a man who is taking away the lives of many is Ahimsa. A real Sannyasin, however, should not defend himself even when his life is in danger. A Sannyasin is one who doesn't associate with his body, instead identifying himself with the Atman. [2]. The statement, taken in full context and meaning within Sanatana Dharma as is applicable to most people.’
To this I would add, actions to protect dharma is sarvouttam dharma, above the parmo dharma of ahimsa. When this is done, one has sanatan dharma and dharmo rakshati rakshita. In the rajasic mould of Vishista-advaita Vedanta, one does not identify oneself with the atman but balances the material and spiritual realms to conduct oneself in society so as to fulfil sanatan dharma at all times.
So in Hindi language it is said that whilst non-voilence (ahimsa) is param (highest) dharma,'dharma ki raksha ke liye yudha karna sarvouttam hai', (to fight a dharmyudha battle to protect dharma as ahimsa in its various manifestations is supreme dharma). This is the essence of dharmayudha in Hinduism.
In this context the analysis here is pertinent: https://www.knowledgeforworldconservation.com/post/the-future-of-humans-in-the-developing-trends-on-coronavirus-pandemic