Yes, you've got it. It's easy to test your hypothesis: simply paste the alert rule expression
100 - (avg by(instance,cluster) (rate(node_cpu_seconds_total{mode="idle"}[2m])) * 100) > 95
into the PromQL query browser in the prometheus web interface, and you'll see all the results - including their labels.
I believe you'll get results like
{instance="foo",cluster="bar"} 98.4
There won't be any "env" label there because you've aggregated it away.
Try using: avg by(instance,cluster,env) instead.
Or you could have separate alerting rules per environment, and re-apply the label in your rule:
expr: 100 - (avg by(instance,cluster) (rate(node_cpu_seconds_total{env="dev",mode="idle"}[2m])) * 100) > 98
labels:
env: dev