Correction to: Nature Nanotechnology https://doi.org/10.1038/s41565-023-01523-y, published online 26 October 2023.

In the version of the article initially published, Figs. 4b–h and 6b–j and their associated legends were inadvertently swapped. The figures have now been corrected in the HTML and PDF versions of the article.