Empty results implicitly close the autocomplete

No, there isn’t. CodeMirror’s behavior matches VS Code here, so I suspect this is generally expected behavior.