Link to node in View with TWIG
In the view fields search for "Link to content", add the field, exclude this from presentation and move it to the top, and now you can use:

{% if body|render|trim is not empty %}
  {{ view_node }}
{% else %}
  {{ title }}
{% endif %}