How to add comment form to a view of nodes in Drupal 9?
However, when hiding and rewriting the result/and or using the
replacement pattern for Content: Comments, the comment form disappears
and only the comment list remains.

It's due to a Views UI bug as I was able to replicate the issue on a fresh install.
A workaround you can do is to do the re-writing via template file rather than via UI.
In your theme's /templates folder add:
views-view-fields--view-name--machine-name.html.twig
and print the view fields there
{{ fields.title.content }} {# title field #}

{{ fields.comment.content }} {# comment field #}

{{ fields.field_name.content }} {# some other field #}

Flush all caches so template gets pickedup.