I haven't found the one I like and I created it myself, Qbserve.
It fits most of your requirements:
- native stand-alone macOS app
- detects idle time
- comes for a flat fee ($40)
- supports projects and tracks time for them automatically (based on opened documents and web pages) but it's also possible to assign time manually
- generates invoices from the tracked time
It also automatically recognizes productivity for sites, apps, and chats (you can assign Skype chats and Slack teams to different categories).
Plus all the tracked information is stored locally on your machine in an SQLite database.