In all honesty, I really don't know how to completely undo all of the changes that Publish does to a project. Many years ago after falling into the quirks of Publish, I never used it again.
If you right click the AdvancedHMI project and go to Properties, the security tab and Publish tab may have some settings like "Enable Click Once Security" that needs to be unchecked.