Correction to: Nature https://doi.org/10.1038/s41586-023-06026-3 Published online 3 May 2023

In the version of the article originally published, in Figure 4a, the left- and right-hand labels now reading “Anti-PD-L2” originally read “Anti-PD-L1”. The labels have been corrected in the HTML and PDF versions of the article.