Ad-hoc filter not working in LogQL with group_left

I have a table that shows the percentage of some values (bar) from the logs, using a query like this:

 sum by (foo, bar) (count_over_time({} | [$__range])) 
/ on (bar) group_left sum by (bar) (count_over_time({}  [$__range])) 

If I enable ad-hoc filtering for the values in the table it is working for all other panels like a charm. Those panels are using simple LogQL queries. But for the table panel it is not working because the ad hoc filter expression is only in the last part of the query injected.
Here is the query with the injected filter:

 sum by (foo, bar) (count_over_time({} | [$__range])) 
/ on (bar) group_left sum by (bar) (count_over_time(
  {} | bar="the_ad_hoc_filter_value" [$__range]

But this is not woking, because the right site of the query contains still all values for bar and the lest site only contains one value.
Can I force the filter to be included in both parts of the query? Or can I prevent that the ad-hoc filter is used of the table panel?