I created a Dynamic Device Group i used the property "EnrollmentProfileName" with the operator "Equals" and the value "BP User Driven" - This is where it get's strange, if you make a value that is equal to your enrollmentprofilename with "spaces" the dynamic group wont work.
So you have to make the DEP profile or Autopilot Profile without spaces
DEP profile allows you to use special characters(like "-") and spaces.
Autopilot profile does not allow special characters only spaces.
But if you name your Deployment profile with spaces the dynamic group wont work.
Solution: Make a Deployment profile without spaces so its the same on both Deployment programs.