I think this is still an issue with scoping of CSS counters.
Even the H2 level does not get reset when adding a new H1 header…
Edit: You could probably achieve this with a javascript and some MutationObservers as I did here to count references to latex equations but I am afraid a CSS only solution is not possible if you want to have consistent numbering with headers defined in different cells.