The reason for this is that deleted graph node are stored in undo history, so there remains memory reference to node (and asset). And if user presses "force delete", Unreal treats deletion of both assets differently (compared to the case where there are no references), eventually setting their GeneratedClass to nullptr before broadcasting OnAssetRemoved delegate. After that, UFlowGraphSchema::OnAssetRemoved triggers for every deleted asset separately (I tried to use AssetRegistry.Get().OnAssetsRemoved(), but it also broadcasts for every asset separately), and broadcasts OnNodeListChanged ... eventually UFlowGraphSchema::GetFlowNodeCategories will be called, and this is the place where first node will be already deleted from BlueprintFlowNodes array, but the second is not and the second already has GeneratedClass == nullptr.
Steps to reproduce:
The reason for this is that deleted graph node are stored in undo history, so there remains memory reference to node (and asset). And if user presses "force delete", Unreal treats deletion of both assets differently (compared to the case where there are no references), eventually setting their GeneratedClass to nullptr before broadcasting OnAssetRemoved delegate. After that, UFlowGraphSchema::OnAssetRemoved triggers for every deleted asset separately (I tried to use AssetRegistry.Get().OnAssetsRemoved(), but it also broadcasts for every asset separately), and broadcasts OnNodeListChanged ... eventually UFlowGraphSchema::GetFlowNodeCategories will be called, and this is the place where first node will be already deleted from BlueprintFlowNodes array, but the second is not and the second already has GeneratedClass == nullptr.