I'm having the same issue. I can see the ATT prompt when I test on my devices, and all emulators, but Apple keep saying it doesn't show up for them. Very annoying as I cannot replicate it. It seems that Apple are using IOS 17 on their test device, so it sounds like this might be the problem.
TRR1 your fix sounds ideal - but how did you determine that the app is past the Testflight screens so you know the right time to show the ATT prompt?