views.view.unformated.html.twig taxonomy conditional if/else
The code doesn't match the template, it's more likely from a views-view-fields.html.twig template. Then you could configure a separate field in Views UI to produce the output you want. Views fields are not a 1:1 match of entity fields, you can rewrite the entity content to whatever you want. Most times it's a better idea to put Twig in Views UI and not in Views templates.
If you really want to access raw field values, don't use the output of Views field plugins. Access field values directly through the node object:
{{ row._entity.field_ref.target_id }}

More info Access row value in template_preprocess_views_view_fields(&amp;$variables)