> the Britons had lines they did not cross, they did not send tanks or imprison and murder leaders.
https://en.wikipedia.org/wiki/Jallianwala_Bagh_massacre ; Ghandi was arrested repeatedly and spent several years in prison. https://www.mkgandhi.org/arrestofmahatma.htm
Possibly the main reason the Empire was abandoned was its physical untenability and expense after the war, along with pressure from the United States.
"Non-violent protest" as practiced today by "progressive" groups is the most useless form of protest you can do.
What they did have was a busted economy after WW2, no access to international credit and a treaty with the Americans that was forcing them to decolonialize. The ongoing independence campaign (mostly paused during the war) put them in the position of "double down or fold" and they chose to fold. I think people overestimate the element of ethical embarrassment.
But if, on the other hand, the state you are fighting will not flinch before brutally suppressing any dissent and murdering hundreds, thousands, or even millions (such as is the case from the imperialists in South America to the Chinese government in Tiannamen), then no peaceful marching will save you, you need to be ready for physical struggle if you want change)