Navigate to query pages with keyboard

Let’s say I have a list of pages achieved with this query:

${template.each(
  query[[
    from index.tag "bar"
  ]],
  template.new[==[
    * [[${ref}]]
  ]==]
)}

This makes it so I can click the page name to navigate there – but only with mouse. If I try to navigate to the list item with keyboard, the rendered list turns into the code block, not allowing me to navigate there with ⌘ + enter.

Any way to achieve this? Maybe an option to not automatically show the code when cursor is there?

This isn’t possible to my knowledge. It will always be rendered as a codeblock if your cursor is in range.
You could try baking, but this kind of defeats the purpose of the query.