Ukraine did a spectacular job to stop the full-scale invasion in the initial hours, days and weeks when there wasn't much international help yet though (and I guess from that moment on the war didn't go quite according to plan from the Russian PoV).
So a lot of their territorial loss can be attributed to his inaction. If they'd laid several million landmines in the Donbass the Russian attack would've been stumped and the occupied Crimea would've been easy prey.
If you mobilize your armed forces and move all your soldiers to the border and dig them in you'll dissuade an attacker from invading.