Deleting table content and editor content together creates new cells

We are testing scenario in the table where we select half of the text which available above the table and then select partial text in the table cells. When we delete the content, the remaining content moves to the above line and new cells are created in its place. I was checking the prosemirror-tables repository but couldn’t find how the cells are being created. It would helpful as we are using the same but upon deletion the table is in a broken state as the cells are deleted and new cells are not being created for us.

Attaching a small video for the same. Prosemirror table