I don’t think this will work for automatic groups like staff, to get a group class to appear on a post I believe it has to be a custom group, and the group needs to be that user’s primary group.
Primary group can be configured in the group’s settings (so when a member is added, that group
automatically becomes their primary group), or it can be manually set from a user’s admin page.
For example, my primary group here is team so if you inspect this post, it should have the group-team class applied.