Given that you're also asked Check if block is visible, I kind of know what you're trying to do.
This isn't really an answer to your question, but I'm wondering if you're on the wrong track with what you are doing.
I don't fully understand why you are using blocks to do what you want in the first place. But assuming that using block plugins is the right thing, block config entities might not be.*
Block plugins are very flexible and designed to be re-usable, e.g. in page_manager/panels, in a completely different way. Block config entity however are not meant to be re-usable like this at all. They have a very specific purpose. To be displayed in a theme region of a specific theme, based on a set of visibility conditions. Trying to (mis-) use them for a different purpose will lead you into corners like this one.
You might want to consider storing block configuration in your own entity type. You could extend from block to get most of its logic but have your own list page to manage them, and then they would be a completely different thing than normal blocks for Drupal and you don't have to worry about them being used/showing up in places you don't expect. For example, even if you hide them in the UI, the block system will still prepare any accessible block and make them available in the configured theme region.
- And since your code example seems to hardcode a specific block plugin, maybe you don't want to use block plugins at all?