P-51D is outstanding above 17k, however Not sure what aircraft it can beat on the deck in a dog fight, if I chose the P38L, Mosquito, dora and 51 in a flat turn, pretty sure the 51 wins without flaps against both 38L and the dora, with flaps every plane should beat it - I think even the dora is roughly even with flaps down in a flat turn.
Mustang is just a long range escort fighter, not a pure dog fighter, in this sense you can't compare it to even a Dora 9 which was basically an interceptor - which doesn't follow the same combat guidelines.
Every aircraft comes with an operating altitude, the P51 stands out above 17-24k - which means its performance is on top of the charts, one reason you don't see an La7 up at 20k.
This being said, take a P47D-11 up to 30k and watch it school any plane under a Tier 5 aircraft.
Comparing the 51D to any P-47 is basically apples to oranges.