I looked into this for the M1 MBA and it had the exact same performance at full load as the MBP...for 7 minutes. Then the thermal throttling hits and it slows down. I'm not sure what the time limit is for newer models. Regardless, the MBA's aren't offered with Pro/Ultra chips, which I desire (and would thermally throttle much sooner than 7 minutes).
My recommendation to friends asking about MBP / MBA is entirely based on whether they do anything that will load the CPU for more than 7 minutes. For me, I need the fans. I even use Macs Fan Control[0], a 3rd party utility, to control the fans for some of my workflows - pegging the fans to 100% to pre-cool the CPU between loads can help a lot.
I edit tons of raw images and 4K video like it’s going out of style.
My used M1 mba is the fastest computer I’ve ever used. If a video render is going to take more than 7 minutes I walk away or just do something in another app anyway. The difference of a few mini means nothing.
I've got a cheap laptop stand with built-in fans that blow against the bottom case of my MBA. With my previous M1 and current M3 the stand keeps them from thermal throttling for longer periods. Most of the time it's completely unnecessary but I use it occasionally when doing long duration compiles or other long term heavy loads. Even without using the stand the tasks would complete in a reasonable amount of time, it just gives me a few extra minutes of "full blast" which is often all I need.
I guess the details depend on how warm it is in your room, and whether your MacBook Air sits directly under a fan.