We're having a similar problem with Inventor 2021. We use the PDF add-in SaveCopyAs method from VBA, called via OLE in a Perl script that is executed by a Scheduled Task on a dedicated Windows 10 physical host with an nvidia GPU. The shading renders correctly with Inventor's "Graphics Hardware" setting of Quality, only when the Windows user is logged in and the scheduled task executes in the foreground mode ('run whether use is logged in or not' option is disabled). In all other scenarios, the shading renders incorrectly and inconsistently with Inventor's "Graphics Hardware" setting of Quality. We still see the coloring in the PDF, but it is not in the correct places.
We are following the Export to PDF API Sample without any additional settings.
The shading is rendered correctly with Inventor is run as a background scheduled task, even with the Windows user logged out, if Inventor's "Graphics Hardware" setting is set to Performance. Since our users are creating the drawings using the Quality graphics setting, we don't think generating PDFs with the Performance graphics setting is suitable.
Annoyingly this only happens with some of our drawings with shading, and not all of them. So we are unable to reproduce it with a simple test drawing.