What is defense and what is offense depends entirely on which political entities you consider legitimate. If you treat the DPR as legitimate, then it was offense for the Ukrainian government to try to assert control.
In the Vietnam war, when the US was sending troops halfway around the globe to try to force a puppet government on the Vietnamese and kill all who resisted, all you have to do is treat the South Vietnamese government as legitimate, and suddenly it transforms from an "offensive" war to a "defensive" one, because the US was simply "defending" the South Vietnamese government. Afghanistan, likewise, if you treat the puppet government we set up there as legitimate then you could claim that the occupation was merely "defending" it. Even the Roman Empire often justified it's conquests by saying they were merely defending an ally. Find two tribes that like to kill each other, name one your ally, wait for a conflict, bam, now you have an excuse to send troops in and acquire new territory for your empire.
Who was on the offense or defense in the American Revolution, or in the American Civil war? That question is entirely dependent on whether you believe the colonies/the South had the right to declare themselves a separate political entity. This is, in my view, a very arbitrary and subjective lens through which to understand conflicts.
A state's legitimacy depends on whether it represents the will and the interests of the people. Offense, defense, legal, illegal, I don't see why any of that would matter from that standpoint. Every revolution or revolt in history was an illegal act of aggression on behalf of the rebels, but just blanket condemning all revolutions on that basis is absurd. We have to look at what they were actually fighting for. John Browns illegal act of aggression was intended to free slaves, the Confederacy's illegal act of aggression was to preserve slavery, and it's on that basis, not the basis of legality or aggression, that we can understand who's right and who's wrong.
When I evaluate the Civil War, I'm not interested in examining the legal minutia to determine whether or not states had the legal right of secession, in order to determine which side was the aggressor. I'm only interested in what the outcomes would actually mean for ordinary people. Even if the Confederacy had had the legal right to secede, then I would still support the outcome that leads to slavery being ended, because that's what materially benefits the people. Therefore, that is the criteria that matters.