Your filter has a bug in it, namely when you call is_main_query, you're not checking if the passed query is the main query, your checking if the currently active query is the main query, which will always be true.

So instead try this:

```php
add_action( 'pre_get_posts', 'modify_frontpage_main_query' );
function modify_frontpage_main_query( \WP_Query $query ) : void {
    if ( $query->is_front_page() && $query->is_main_query() ) {
        $query->set( 'post_type', 'some_post_type' );
    }
}
```