After experimenting some more, it seems to me like when the entity is a ghost entity, the selection-tool entity type filter matches against the ghost_type instead of the regular type, does this sound correct? Matching against the ghost_type makes sense for blueprint-like tools, but it doesn't work so well for what I'm trying to do...
I can think of two ways the API could be changed to solve my problem:
- Make the selection-tool entity type filter match against both the regular type and the ghost_type when considering ghost entities (i.e. make it so "entity-ghost" actually works as an entity type filter)
- Add a "ghost-entity" selection mode that I could use in place of "any-entity". I think this solution makes more sense, because the new selection mode could be further combined with an entity type filter if desired, e.g. to make a selection tool that selects only Roboport ghost entities.