David Kimura PRO said over 4 years ago on Autocomplete with StimulusJS :
  You can just modify the content tag into a block.

<%= content_tag :li, role: :option, data: { 'autocomplete-value': product.id } do %>
  <%= product.name %> |
  <%= product.price %> |
  ...
<% end %>