This thread helped me find the actual solution, right under the source code above it checks for a variable called bOmitPCDebugInfoInDevelopment on whether it should generate PDB files.
In my Game.Target.cs file I added:
if(Configuration == UnrealTargetConfiguration.Shipping) {
// Disable PDB debug file generation in shipping builds
bOmitPCDebugInfoInDevelopment = true;
}
Warning: Will trigger a couple hundred build steps.