Restoring territorial integrity and sovereignty over the lost territories is Ukraine's goal. In particular, this means that these territories should be fully demilitarised, i.e. not only foreign, but all military formations altogether have to be withdrawn. This is the issue of handing over weapons, mine clearance, return of refugees, their re-adjustment.
Ukraine cannot deal with this on its own, even more so as currently it has no representation in the occupied territories.
To resolve this situation, we need a peacekeeping mission that would undertake at least a part of these tasks, and then turn over its authority to official Ukrainian agencies.
A decision on introducing such peacekeeping mission is being approved by the UN. However, if they work in a standard mode, the decision will be blocked in the Security Council by Russia's veto. Russia's right to veto can be overruled in one way — by denying it this right not altogether, but in this issue specifically. According to Article 27 of the UN Charter, Russia can be denied its right to veto as a party to the conflict. So, Russia has to be recognised as party to the conflict. This is the only option for Ukraine to resolve this issue. However, depriving Russia of its right to veto is an extremely complicated matter.