I fixed this bug by simply checking, if an array with the form field name as key name exists.
Additionally I addressed also following error:
Deprecated function: Creation of dynamic property Drupal\group_by_field_widget\Plugin\Field\FieldWidget\GroupByFieldReferenceWidget::$groupableFields is deprecated in Drupal\group_by_field_widget\Plugin\Field\FieldWidget\GroupByFieldReferenceWidget->__construct() (line 79 of modules/contrib/group_by_field_widget/src/Plugin/Field/FieldWidget/GroupByFieldReferenceWidget.php).
I was too lazy too create another issue for such a simple thing.
StefanieB → created an issue.
Thanks, you saved me hours of research. I can confirm that downgrading to xdebug-3.2.2 fixes the problem.