I try to bind codemirror6 with prosemirror two month ago. And I make some updates recently. Hope it can give you some hints.
For your focus bug, add the update method of NodeView will fix it. But you still need to do some extra jobs in update method.
