How can I hide a node flag using twig
The without() filter's argument should be just the name of the key itself, which in this case is flag_class_registration without the content.. Consider - the filter only receives the expression that comes before it, so it's already inside the content array.

   {{ content|without('flag_class_registration') }}