The law, entitled On the aspects of state policy on the restoration of the state sovereignty of Ukraine over the temporarily occupied territory of the Donetsk and Luhansk regions of Ukraine did no such thing. The Minsk agreement was to grant autonomy, not independence or Russian annexation, to Donbas. Legislation for this autonomy was first passed in 2014 and renewed in 2020 (Ukraine Extends Donbas Special Status Law By One Year). The 2018 law that you referenced just states that Donbas was Ukrainian territory temporally occupied by Russia. By the Minsk agreement Russia was required to restore control of the border to Ukraine, reintegrating it into Ukraine. It is Russia that failed to honor the Minsk agreement, not Ukraine.
In all the Russian hype about Ukraine allegedly not complying with the Minsk agreement (falsely implying that Ukraine was supposed to grant Donbas independence) what has been left out has been the actual desire of the people of Donbas. Two separate poles, one in 2016 and another in 2019, showed that a majority of respondents in the Russian controlled area wanted to return to Ukrainian sovereignty (Most people in separatist-held areas of Donbas prefer reintegration with Ukraine – new survey). The idea that the Russians are just protecting the people of Donbas who desire independence from Ukraine is pure Russian propaganda. Russia is acting on its own interest, not that of the people of Donbas.