iOS 17.4 introduced contentAlignmentPoint. All you need to do now is
contentAlignmentPoint
tableView.contentAlignmentPoint = CGPoint(x: 0, y: 1)