Hmm, it looks like a bug in bbPress.
Maybe try using this?
add_action( 'bbp_akismet_spam_caught', static function () {
$GLOBALS['lovely_spam_wonderful_spam'] = true;
}, 10, 0 );
add_action( 'bbp_new_reply_post_extras', static function ( $reply_id ) {
if ( isset( $GLOBALS['lovely_spam_wonderful_spam'] ) ) {
bbp_update_reply_walker( $reply_id );
}
}, 10, 1 );
add_action( 'bbp_new_topic_post_extras', static function ( $topic_id ) {
if ( isset( $GLOBALS['lovely_spam_wonderful_spam'] ) ) {
bbp_update_topic_walker( $topic_id );
}
}, 10, 1 );
That’s not an ideal solution, as it may be kind of slow. It would be better to fix this in the bbPress code itself, but it looks like it would be complicated, requiring multiple changes in different parts of the code. I doubt the bbPress developers are going to fix it any time soon either, as the project seems kind of dead (it hasn’t had a release in years).
Also, note that the above code won’t do anything for existing spam topics/replies – it will only work for new incoming spam topics/replies.