As shown below: When editing a header or footer, the Header and Footer Tools tab appears. If you choose to link to the previous title, the effect will not be segmented.
So don't select "Link to previous header" in the header, and select "Link to previous header" in the footer to number consecutively.