You might try enabling logging of the install/uninstall to see where the issue is appearing. In my experience, this isn't common, so I can't really suggest what might be causing it. In the installation guides are command line instructions for installation (although they don't really cover uninstall as I recall). I would start there though. You might also open a support case as our GCS team should be able to assist.
The thing is As part of installation guide instructions it suggested pega native function, pega rpa service installation etc and installed them but later I have uninstalled all. I was able to uninstall all but not peganativefoundationsetup. So tried again to install but remaining installation is also not supporting because of the above mentioned issue.
It would be helpfull if I get ROAiROA/RP. Installation .guide
Finally used "MicrosoftProgram_Install_and_Uninstall.meta" which is Microsoft Program Install and Uninstall Troubleshooter for uninstalling the PegaNativeFoundationSetup. Now it is working and able to reinstall again. Hope it will be useful for some one who is facing the same problem.