There are some permissions that are not applicable to a scratch org and this is one of those weird ones. Pushing the standard Admin profile to my scratch org I encountered this error.
You may not modify the permission Access Tracer for External Data Sources while editing a Standard Profile.
To fix this you need to edit and remove this specific profile permission. So far I cannot find any documentation about this TraceXdsQueries permission and what it actually does.
<userPermissions> <enabled>true</enabled> <name>TraceXdsQueries</name> </userPermissions>