A 'view all' permission set in non Prod environments must not have references to the following objects else I'll receive a deployment error:
The deployment error message read like this:
In field: object - no CustomObject named ScratchOrgInfo found
However, if these objects aren't referenced during a Prod deploy, then I will get deployment error messages saying that those aforementioned objects must be referenced as they depend on the 'view all' permission.
I don't understand why this delta between Prod and non Prod environments is happening - our non Prod environments are recently refreshed. I do not have the Dev Hub enabled in Prod but don't see how that could be a cause of this issue.