Is it possible to use Dynamic re-ranking together with grouping

We are currently using Algolia dynamic re-ranking on our category pages and we are also grouping variants together using distinct, but now the totalnumber of result and hitperpage doesnt work as expected.

The calls return exactly what we ask for 24 results per page, but it should in fact return lots more because of the grouping. The results in our category pages is not showing the correct number of result and it also gets our load more function to break.

This page should show 24 but it is only showing 13:

Can anyone help?