How to show the cursor after an image element

Hi, I have a simple image block element with the following schema:

export const SCHEMA = new Schema({
  nodes: {
    doc: { content: 'block+' },
    imageBlock: {
      group: 'block',
      toDOM: () => ['img'],
      ...
    },
  },
});

After creating and focusing on the image block, ProseMirror-hideselection class is added to the parent dom, and the cursor does not appear. If I change the above schema like this:

- toDOM: () => ["img"]
+ toDOM: () => ["p"]

the cursor does appear normally.

It would be great if you could teach me how to make the cursor visible after the image block like the one in the tutorial (ProseMirror upload example).

Tried to see the difference between my code and the one in the tutorial but couldn’t figure out.