I was able to replicate your issue. I ran into the same issue while I was developing my extension.
If the extension location is at ContextMenu, there seems to be a bug. "onListViewUpdated" event is not firing whenever you selecting and deselecting the items. So the "event" parameter is still holding the old values. Try to move the location to CommandBar.
You might need to update the location element in the following locations