Tags with notes as site children

I’m displaying the latest note as the home page using:

   'ready' => function() {
        return [
            'home' => site()->children()->listed()->sortBy('date', 'asc')->last(),
        ];
    },

And my notes are not children of a “notes” page they’re in the site root. This seems to have broken tags and I’m not sure where to look to try and solve this problem. Any hint that someone could provide would be very helpful thank you-

What do you mean exactly?

Once I move notes to the site root instead of as children of a “notes” page, and change in the note.php template this line:

<a href="<?= $page->parent()->url(['params' => ['tag' => $tag]]) ?>"><?= esc($tag) ?></a>

to remove the parent() part, the tags links don’t function anymore. I’m just not sure where to look to continue troubleshooting.