Top menu disapears in Category Pages when filtering using ACF

From pre_get_posts in Codex:

Identifying Target Queries

When using pre_get_posts, be aware of the query you are changing. One useful function is is_main_query(), which can help you ensure that the query you are modifying is only the main query. Use it in combination with other conditional tags to only alter the main query on the pages you want.

pre_get_posts is executed for every query on a page, which includes the query that loads your menu items, so you need to check if $query->is_main_query() before you modify it, otherwise you’ll apply your query modifications to other queries.