Prevent redirection after comment submission
Use FormStateInterface::disableRedirect(), e.g.

$form_state-&gt;disableRedirect();


Make sure you run that code in a submit handler for the form, not in the form alter hook.