M2 is based on the A15 cores and built on N5P. A16 will beat the M2 on single core performance only (thanks to a newer core design on a newer process), but by virtue of having more performance cores and graphics cores the M2 will still win in multi-core performance and graphics performance, but will also consume more power than the A16 (which is why M series chips are only used in devices with larger batteries).
Are these two even that different? N5P and N4 are both refinements of the same core N5 technology. N3 will be the next big step, being 41% smaller than N5 and thus making room for many more cores on the same area.