Not sure if this is more of an Apple, or Meraki quirk. But that error reads like you have an existing passcode or restrictions payload that prevents a user from changing the device passcode. The "Teacher Settings" profile is probably tied to the Classroom app, yes? So there's probably something in the default Classroom configuration that makes you change the device passcode that's in conflict with the other profile blocking passcode changes. A test would be to remove whatever other passcode restriction profile you have, then push the Teacher Settings profile and open the Classroom app to see if there's anything that requires a passcode change.
... View more