Filters block Search

Hello,
I have one question about filter and search functions.
When the user search something at the main page, it works well.
But when the user clicked filter button (like work category or timeline), the webpage goes to “/home/works/category:Photo” and from that moment the search result comes out based on the categorized webpage.

So, is it possible to make search result show all works even though the webpage is categorized?
Please let me know what should I edit something from the code line to solve this.
Thank you:)

In your search form, what do you have in the action attribute?

This is the code for the search part!

<div class="search">
    <form>
        <input class="search__bar" type="search" aria-label="Search" name="q" value="<?= html($query) ?>">
        <input class="search__btn" type="submit" value="Search">
    </form>
    <ul class="search--results">
        <?php foreach ($results as $result): ?>
        <li>
            <a href="<?= $result->url() ?>">
                <?= $result->title() ?>
            </a>
        </li>
        <?php endforeach ?>
    </ul>
</div>

Your form doesn’t have an action attribute. Set the action attribute to the url of your page

Now it works:)
Thank you for your help!