Route that renders a node has title of route rather than node title
As it is routing path, Drupal will always look for the title in routing.yml, if you want to set title for this you can do as follows,

$build['#attached']['html_head'][] = [
    [
      '#tag' =&gt; 'title',
      '#value' =&gt; "Node title"
    ],
    'title'
  ];


OR

$build['#title'] = 'Node Title';


Here you can replace "Node Title" with your dynamic node titles.