Make the Select All (+A) selection first, and then in Calc menus select the Data → Sort → Options – “Range contains column labels” check box.
Here is the key: Column labels are not limited to Row 1, just the first row of the selected range of cells.
So, within a spreadsheet “Range contains column labels” for sorting is determined when working with a selected Ranges of cells, and again is independently determined when using the Select All. They use the same options checkbox for Column labels, but function differently, e.g. Select All is a unique set, but multiple ranges of selected cells can be sorted (and need to identify if they have column labels).
Within a spreadsheet, once set the Select All setting is statefull and remembered. But as you establish additional selected ranges you need to set sort option if “Range contains column labels” for each new range. And each spreadsheet can have multiple working ranges defined and saved with it.
The “Contains column labels” for each range of cells and the Select All case can be independently toggled.
Column label value is unchecked by default for a new spreadsheet, for the Select All case, and for each new range. Have to be careful about what range of cells or if Select All is selected for the sort operation.