I think this is a bug because it happens only for the first block. Other blocks are deleted completely without any problems. I found a workaround:
cursor = QTextCursor(doc.findBlockByLineNumber(0))
cursor.select(QTextCursor.BlockUnderCursor)
cursor.deleteChar()
cursor.deleteChar()
You should do it if you want to delete the first block. If you want to delete other blocks, use your original code.
Maybe it's appropriate to create new QTextDocument and copy all blocks except the block you want to delete.