I'll compare these to the WF-1000XM3 since that seems to be the best comparison and I own and have used both.
The Sony headphones have better sound. Period. There's no way around that and it isn't by a small margin it's pretty obvious. The Sony app also has a ton of options when it comes to how much ambient sound you want to allow in as well as being able to quickly switch between EQ options. Another thing that the Sony headphones do that is great is the ability to hold your finger on the left earbud to temporarily quiet the music and allow ambient sound in which is nice if you want to be able to quickly talk to someone or something then release your finger and go back to your music or podcast or whatever.
The AirPods Pro have the advantage of being better integrated into iOS. This means much faster pairing as well as the ability to quickly see the battery life of the ear buds and case in the widget screen. The case is also much much nicer and smaller. The Sony case is massive in comparison and sort of a pain to carry around. However on this note: the Sony charging case is USB-C which is wonderful and I really cannot wait until Apple ditches lightning and dives fully into USB-C. I also found that the AirPods Pro "transparency" mode is better than Sony and it really feels like you're not wearing the AirPods at all and it's a weird experience it's almost as if you're listening to the audio out of a speaker or something in the room but only you can hear it.
The ANC is comparable between the two and are both great but I haven't been able to test the AirPods Pro extensively in different scenarios as I just got them today. ANC is for public transport and blocking out noise like fans, trains, planes things like that.
The most important point in my opinion is that I have found the AirPods Pro to be far more comfortable than the Sony pair. I tried every tip that Sony includes and none of them were nearly as comfortable. They all felt like they were pushing my ear apart from the inside or about to fall out.
The trade offs in sound and comfort have me leaning towards the AirPods Pro being my preferred choice but it isn't an obvious choice and
as Snazzy said if we could somehow combine these two products it would be the perfect product. If sound quality is the most important thing to you then the Sony headphones are the way to go in my opinion but for me the convenience and comfort have me choosing the AirPods.