AFAICT that query doesn’t take into consideration Likes that were given, then taken back (or otherwise negated).
If you run
SELECT *
FROM post_actions
WHERE post_action_type_id = 2
AND user_id = deleted_by_id
does the difference in the count jive?