With that document, your list of positions is indeed correct, and position 35 is before the empty paragraph. Which isn’t a selection that ProseMirror will normally create. Could it be that your own code created that selection?
In any case, the node() accessor on a resolved position will return the node around that position, not the node after it. So section is absolutely the expected return value for the expression you provided.