I have a view with search functionality implemented with a UICollectionView. In a cell in section 0 there's a UITextField used for input. Changes in it trigger an update, during which collectionView.performBatchUpdates is called, with the updates block containing insertSections, deleteSections and reloadSections calls that only affect higher section indices.
On previous iOS versions there are no issues here, but starting on iOS 17, keyboard drops after every character entered. Adding a symbolic breakpoint on -[UIResponder resignFirstResponder] results in a break on the collectionView.performBatchUpdates call with the following UIKit methods in the stack trace above it:
#0 0x00000001852e5b78 in -[UIResponder resignFirstResponder] ()
#1 0x00000001855d6bcc in -[UITextField resignFirstResponder] ()
#2 0x0000000184a38f34 in -[UICollectionView _resignOrRebaseFirstResponderViewWithIndexPathMapping:] ()
#3 0x0000000184a37394 in -[UICollectionView _updateWithItems:tentativelyForReordering:propertyAnimator:collectionViewAnimator:] ()
#4 0x0000000184a309f0 in -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:collectionViewAnimator:] ()
#5 0x0000000184a3a808 in -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:animationHandler:] ()