When we entered 5 years ago with my ( Dutch/Peruvian) children, we got for them a 'laissez-passer' from the Peruvian consulate. So although they didn't have a Peruvian passport ( actually the Peruvian consulate physically didn't have Peruvian passports, you could only renew old ones ) they entered Peru as Peruvians.
Once we were in Peru we got their DNI and Peruvian passports, but as said, they entered Peru as Peruvians.
If you look on the website of Digemin there is not any information or tramite about entering as a tourist and leaving as a Peruvian. Knowing their burocratic rules, this probably is impossible..
You might be lucky with the immigration officer, but on paper you entered as a tourist, and have to exit as a tourist ( including any fine )
If you exit as a Peruvian and you are lucky with the immigration officer, it still will be registered wrong in the immigration system, possibly causing problems in the future, as you never can proof in the future that you left as a tourist.