Block Editor: Optimize __unstableGetVisibleBlocks()
#47681
Merged
__unstableGetVisibleBlocks()
#47681