This can be achieved via the REST API.
For example this post has two mentions, one from a deleted user https://discuss.flarum.org/d/24432-audit-log-free/10
I can get the post ID, then fetch https://discuss.flarum.org/api/posts/136533
Then in data.relationships.mentionedBy you see the IDs of the two posts that mention it.
Those posts can be found in the included array below.
Then each of these post will have relationships.user which might be null or point to a user ID.
Information about the user ID can also be found in the included array.
This is https://jsonapi.org/ syntax. If you're using a library that supports the format you can access relationships directly (for example, if using the Flarum javascript store, it can be access through (post.mentionedBy() || []).map(post => post.user())