Grid Select All Breaks on last changed row

Whenever I change a row and after that I want to select all items in the grid, the last changed row is not automatically selected.
Any idea how I can fix this?

Grid code

public CustomFieldGrid(List<CustomField> customFields) {
    setSelectionMode(SelectionMode.MULTI);
    addEditColumn(CustomField::getName).text(CustomField::setName)
            .setHeader("Name")
            .setSortable(true);
    addEditColumn(CustomField::getDescription).text(CustomField::setDescription)
            .setHeader("Description")
            .setSortable(true);
    addEditColumn(CustomField::getType).select(CustomField::setType, CustomFieldType.class)
            .setHeader("Type")
            .setSortable(true);
    addEditColumn(CustomField::getSearcher).select(CustomField::setSearcher, CustomFieldSearcher.class)
            .setHeader("Searcher")
            .setSortable(true);
    setItems(customFields);
    setAllRowsVisible(false);
}```
![image.png|855x235](upload://4IvPRRE6cylfhx6G0LS9pKjjkUC.png)
![image.png|621x214](upload://u1S7iPZoknrZCbj6Co7f76B3tZT.png)

image.png
image.png

If you implement a “sticky” hash code and equals method based on an unique non-changing identifier it works.