From what I can see by experimenting, there is probably a “glitch” (if it isn’t a bug) in spacing management at the frontier of section.
The gray clue indicating section switch is drawn immediately below the characters of the last paragraph in the previous section (or main area) without consideration for “spacing below” which IMHO is still part of the current section.
The space between the last line in the preceding section and the first line of the new section is made up of the sum of the “space below” for the last paragraph and the “space above” for the first paragraph. This space is erroneously taken as part of the previous section and “backgrounded” as such.
An inconsistency occurs at end of section. The gray clue is drawn immediately below the characters, the same as at start. But now the space (sum of “space below” for last and “space above” for next) is not part of the section we are leaving but considered part of the main page area. See screen shot:
Summary
Backgroundwise, Writer considers the section effectively begins at the top of the bounding box of the characters composing the first paragraph and it ends at the bottom of the bounding box of the characters in the last line.
I don’t know if this is a misconception or an intentional specification.
Personally, I would consider that spacing above and below a paragraph belongs to the paragraph. Since the paragraph is inside a section, the section should include this spacing because a user could intentionally format the section with section-specific styles in order to achieve a desired layout.
If you consider this is a bug, I’ll fill in a bug report on your behalf with the attached sample file corresponding to the secreenshot.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
EDIT
Bug report at tdf#137069