Yes, I think the citizens can repudiate a government, which the Ukrainians did
then they got invaded by their neighbor
different from Texas seceding
you are the one mixing apples and oranges
America from Great Britain comes to mind. And the Continental Congress that voted to secede in 1776 did not even schedule a refrendum - according to today’s EU, that would be illegal since it did not include the consent of the people of Great Britain in changing the political status as one of its parts. In our present day world, by definition, the American Revolution would be considered the work of a regime of anti-British outlaws. So there you have it.
“different from Texas seceding”
Strictly speaking, Texas did not secede from the Mexican Government under which the Texas Government obtained its authority under the Mexican Constitution. Instead, rebels overthrew the government of Mexico in a coup that scrapped the Mexican Constitution. Texas and a few other mexican states remained loyal to the Constitutional Mexican Government, until Santa ana’s rebel armies systematically conquered all of the loyal states but Texas and a couple of other Mexican states. By that time the Federal Government authorized by the overthrown Mexican Constitution ceased to exist, and Texas declared independence from the rebel revolutionary government of Mexico that forcibly usurped the constitutional Mexican federal government.
In the present case of the Ukraine, Putin’s intelligence services perpetrated a coup in the Ukrainian government some years ago to put his agent, Yanukovych, in control of the Ukrainian government. These treasonous Russian agents then proceeded to use massive vote fraud to defraud the people of Ukraine and keep the Russian traitors in their Ukrainian positions of power and control over the Ukraine. The people finally rebelled against the treasonous government and insisted upon the Ukrainian parliament to act to restore a loyal and honest governemnt in the Ukraine. When Putin’s Russian coup in the Ukrainian government failed, he then used the events he unlawfully precipitated as a pretext for invasion and conquest to accomplish what his subversion and treason in the Ukraine failed to accomplish.