The following helped me out:
If you're upgrading from Oreo to Pie, the stock ROM (at least on OnePlus) has a file called "compatibility.zip" inside the zip of the stock ROM
If you have a mac or linux: Just do
zip -d [path to your stock ROM] "compatibility.zip"
for example zip -d...