Filtering in the pivot is done not against the already rendered data, but against the original dataset. As result, the component needs to recreate and reload dataset after filtering ( the result dataset may differ a lot from the not-filtered one ). And as part of reloading the row collapsing state is lost.
It possible to get state of datatable ( sorting/open-close state etc. ) and reapply it after filling the pivot