You can only reason compare IPC of a GPU within the same vendor as nvidia and AMDs architectures are very different (not like there both x86 cores like in the CPU world). You can only really compare performance per watt between the vendors. IMO anyways
They are different, yes, you see that in difference games, AMD does better than Nvidia in Metro Exodus despite it being an Nvidia title while Nvidia does better in Outer Worlds despite it being an AMD sponsored title.
You're right about comparing IPC AMD vs Nvidia, however 'for science' i still think its useful to compare them if you take a wide range of titles and average the overall performance.
A 5700XT running at about 1800Mhz with 2560 Shaders is at least as fast as an RTX 2070 running at 1950Mhz with 2304 Shaders (overall) out of this fairly comprehensive collection of games.
https://www.techpowerup.com/review/amd-radeon-rx-5700-xt/28.html