Hi! I faced the same issue and setting alwaysBounceVertical to false when there are no items and back to true when collection view has items to display right before applying the data from the snapshot to the diffable data source helped to fix the issue:
collectionView.alwaysBounceVertical = !collectionViewItems.isEmpty
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: