## Bug description

When you create a trend with two lines, one of which is say $pageview with a filter of browser = chrome and the other is ALSO $pageview but a different filter.

If you click on any the line you get the same users in the persons modal, even if you switch the trend line toggle in the modal.

## How to reproduce

1. Create a new trend
2. Add a $pageview trendline, and another $pageview trendline with a subfilter
3. Click on any of the lines
4. Open the persons modal and switch between the trend lines in the persons modal

## Environment

- [x] PostHog Cloud
- [ ] self-hosted PostHog (ClickHouse-based), version/commit: _please provide_
- [ ] self-hosted PostHog (Postgres-based, legacy), version/commit: _please provide_

## Additional context



#### *Thank you* for your bug report – we love squashing them!

posthog/api/utils.py
shared_conditions = f"WHERE team_id = %(team_id)s {conditions}"
    ordering = (
        "ORDER BY last_seen_at DESC NULLS LAST, query_usage_30_day DESC NULLS LAST, name ASC"
        if is_enterprise
        else "ORDER BY name ASC"
    )
    if include_actions:
        event_definition_fields.discard('"id"')
        action_fields = {
            f'"{f.column}"'  
            for f in Action._meta.get_fields()
            if hasattr(f, "column") and f.column not in ["events", "id"]  
        }
        combined_fields = event_definition_fields.union(action_fields)
        raw_event_definition_fields = ",".join(
            [f"NULL AS {col}" if col in action_fields - event_definition_fields else col for col in combined_fields]
            + ["id", "NULL AS action_id"]
        )
        raw_action_fields = ",".join(
            [f"NULL AS {col}" if col in event_definition_fields - action_fields else col for col in combined_fields]
            + ["NULL AS id", "id AS action_id"]
        )
        event_definition_table = (
            f"""
                SELECT {raw_event_definition_fields}
                FROM ee_enterpriseeventdefinition
                FULL OUTER JOIN posthog_eventdefinition ON posthog_eventdefinition.id=ee_enterpriseeventdefinition.eventdefinition_ptr_id
            """
            if is_enterprise
            else f"""