Use has_filter on comment_post

You’re adding the action on comment_form_before_fields in comment_form_logged_in_after. The latter is called only when the user is logged in, and the former is only called when the user is not logged in.

You can add WordPress actions and filters at any time after WordPress is initialized. If you’re adding the action in a plugin, add it on init or even when the code is first executed (i.e. not on an action but directly in the plugin).

This way, the action is added immediately and called when it needs to be called.