I've been looking at a Sapphire Nitro+ 5700XT for my 2019 Mac Pro, but the card length is listed at 12.01". I've seen that it fits in the Mac Pro 5,1 (barely, but it fits), but I don't know if there is more room in 5,1.
PowerColor Red Devil: 300mm*132mm*53mm
Sapphire Nitro+: : 306x 135 x 49 (mm)
The full length PCIe card standard is apparently 312 mm (yay Wikipedia). I suspect the MacPro's full length slots follow this standard pretty closely, though I've not measured directly.
A separate issue is that the MacOS drivers for the 5700xt don't seem very mature, and give poor/erratic benchmark results - barely more than the default 580X. It was hoped that 10.15.4 (and 10.15.3 before it) would be a miracle patch - and bring the release of the official 5700 card. Unless confident that your workload will benefit from a 3rd party 5700xt with the drivers in the current state, it might be worth waiting until the official card is released, and the miracle patch released.
(Which may turn out to be Catalina's successor OS at this rate).
I have the exact same card; that you reference in my MacPro7,1 and it fits and works fine in both macOS and Windows 10. I use it via an idmi connection.
I just bought a Sapphire Nitro+ 6900 XT 310 mm (length) and didn't fit in mine unfortunately. I think the 312 mm number is for that groove in the back that allows for more stability by sliding the PCB in between the groove when installing long cards. The heatsink unfortunately on the 6900 XT interferes with that unfortunately. I'm curious to hear how tight of a fit the 5700 XT Nitro + ended up being.
PowerColor Red Devil: 300mm*132mm*53mm
Sapphire Nitro+: : 306x 135 x 49 (mm)
The full length PCIe card standard is apparently 312 mm (yay Wikipedia). I suspect the MacPro's full length slots follow this standard pretty closely, though I've not measured directly.