Invalidate block cache programmatically
The SystemMenuBlock of core is invalidated when its menu changes because this method:

public function getCacheTags() {
  // Even when the menu block renders to the empty string for a user, we want
  // the cache tag for this menu to be set: whenever the menu is changed, this
  // menu block must also be re-rendered for that user, because maybe a menu
  // link that is accessible for that user has been added.
  $cache_tags = parent::getCacheTags();
  $cache_tags[] = 'config:system.menu.' . $this-&gt;getDerivativeId();
  return $cache_tags;
}


I think you can solve your problem in the same way.