i am trying to filter modelgroups to create drawings based on their bounding box. The creation of te drawing is not the problem but filtering the modelgroups tranlates them to strings. is there a way to do this with elements as outcome?

You are filtering the names of the elements, rather than the elements themselves.

The second Element.Name node is unnecessary because List.GroupByKey gives you those already in the unique keys output. In the example below, the List.FilterByBoolMask preserves the groupings, but you can subsequently flatten if a 1D list is desired