GreXXL it seems like AutoModerator doesn't support new discussions and posts not having an author at the time of publishing. What I see in its source code seems to confirm it.
Technically, Flarum itself doesn't officially support it either. But this extension goes around a few Flarum interfaces and unsets the relationships again before saving.
We don't see it in the backtrace but I assume this particular error originates in Metric\PostsMade
.
Nothing I can do on my side for that one, this should be changed in AutoModerator.
Collecting the metrics for the correct anonymous authors in AutoModerators would be a full project in itself... I hope anonymous posters can act outside of AutoModerator's influence because otherwise there is currently no way to have an extension like this understand that those users are posting content... To other extensions it just looks like posts with deleted authors and users with no content.