Try out KtSkript and the following script.
onBlockBreak {
if (causedByPlayer) {
transactions
.filter { it.original.state.type == BlockTypes.MOB_SPAWNER }
.forEach { transaction ->
val location = transaction.final.location.get()
delayTicks(1) {
val itemEntity = location.createEntity(EntityTypes.ITEM)
val item = ItemStack.builder()
.fromBlockSnapshot(transaction.original)
.build().createSnapshot()
itemEntity.tryOffer(Keys.REPRESENTED_ITEM, item)
location.spawnEntity(itemEntity)
}
}
}
}
It drops the spawner item when the block is broken. You might want to test how it behaves when breaking with slik touch though.