Packaging seem to fail because the project cannot be signed due to a missing developer ID, however just to package and run a project on a mac there should be no signing required.
As you enabled ‘modern Xcode’ in the settings, make sure that ‘Platforms/XCode Projects/Mac: Sign To Run Locally’ is unchecked. If this doesn’t work you could still compare other differences of the settings of your project and a the one reated from the blank template.