Editing an activity always logs a backtrace about duplicate key if you don't change the With Contacts
@eileen One thing I'm seeing as a result of https://github.com/civicrm/civicrm-core/pull/18566 is that every time you edit an activity and save it it silently logs a backtrace for the PEAR error since the target contact always already exists if you haven't changed it. I suppose edits are less common than new activities, so maybe it's still a net win, but logging a backtrace maybe is worse than an extra query.
To think about...
I haven't marked it regression since it's not a bug exactly.