I was able to import Foundation after running python3.11 (version & which below):
python3 --version && which python3
Python 3.11.3
/usr/local/bin/python3
…but that didn’t fix the issue.
With your info that Duplicati only cares what’s in usr/bin/python3, I see that version is 3.9.6. Trying to import Foundation there didn’t work, either.
The fix: after I installed pyobjc using the pip3 sitting in /usr/bin
/usr/bin/pip3 install pyobjc
…when I run Duplicati from /Applications I get the TrayIcon!
It also launches properly when I run:
mono Duplicati.GUI.TrayIcon.exe
…without error.