Give "group by" the option to sort the items

I would love to see an option to have the “group by” functionality together with a sorting option. There is only one way to sort items, and the “group by” depends on that sorting. However, it would be great to be able to set for example “Group A” always on top.

For example: I would like to pin posts always on top, regardless of the “sort data” setting.